[plan-build] Fix on_exit trap behavior in subshells.
[plan-build] Fix on_exit trap behavior in subshells.

This change essentially skips behavior in the `_on_exit()` trap function
when it is operating in a subshell. This prevents timing information and
other cleanup from happening multiple times, or worse, get captured into
a variable in the parent shell.

Pull request: #449
Approved by: adamhjk

rsertelon/habitat,habitat-sh/habitat,habitat-sh/habitat,georgemarshall/habitat,rsertelon/habitat,habitat-sh/habitat,habitat-sh/habitat,nathenharvey/habitat,habitat-sh/habitat,nathenharvey/habitat,habitat-sh/habitat,georgemarshall/habitat,rsertelon/habitat,georgemarshall/habitat,georgemarshall/habitat,georgemarshall/habitat,rsertelon/habitat,rsertelon/habitat,nathenharvey/habitat,georgemarshall/habitat,georgemarshall/habitat,rsertelon/habitat,nathenharvey/habitat,habitat-sh/habitat,georgemarshall/habitat,habitat-sh/habitat,nathenharvey/habitat,nathenharvey/habitat,rsertelon/habitat