Fix two issues:

#1 http.request ignores hostname specified through "hostname" option. Now hostname has priority over host, as per Node documentation.

#2 bufferToString fails when encoding passed is undefined. On real NodeJS this works fine, and some popular NPM modules (request) were breaking in part because of this.

Also add the 'constants' module from Node's sources.
Merge branch 'buffer-and-client-fixes' into fixes-for-request