Backport fixes from trunk.
Merge branch 'joyent/feature/miscfix/2014Q2' into joyent/release/2014Q2
Update 'joyent' submodule.