Fix multi-module issues and gui sample issues reported by Coverity. And refine the build script of go language-binding sample.
Apply clang format for c source files under samples folder