golang: set TMPDIR to avoid relying on /var/tmp
golang: set TMPDIR to avoid relying on /var/tmp

Go will look at TMPDIR and if it isn't set will fallback to use
/var/tmp for temporary file creation (see go's
src/lib9/tempdir_unix.c). This is a sane approach but will fail when
there is either no /var/tmp or if /var/tmp has restrictive
permissions. For example a go package such as consul-migrate will fail
with:

    # github.com/hashicorp/consul-migrate
    cannot create <nil>/go.o: No such file or directory

Rather than rely on /var/tmp we setup a build-tmp directory in
${WORKDIR} to avoid any issues.

More info:
https://codereview.appspot.com/8355045
https://groups.google.com/forum/#!topic/golang-dev/_efVYgJ3AIo

Signed-off-by: Mark Asselstine <9d979f2c41783077c213bce515ff7ad668691d2c@windriver.com>

masselstine/meta-overc,jwessel/meta-overc,OverC/meta-overc,OverC/meta-overc,OverC/meta-overc,WindRiver-OpenSourceLabs/meta-overc,masselstine/meta-overc,masselstine/meta-overc,mufeng/meta-overc,mufeng/meta-overc,masselstine/meta-overc,OverC/meta-overc,OverC/meta-overc,jwessel/meta-overc,WindRiver-OpenSourceLabs/meta-overc,jwessel/meta-overc,mufeng/meta-overc,WindRiver-OpenSourceLabs/meta-overc,OverC/meta-overc