Fix hostname length bug

The length of the hostname in some platforms can be larger than 255 bytes.
And I don't want to include those headers define the max hostname length in current platform,
so simply define a new MACRO to finish this job.
Fixed crash caused by wrong chunkSize read
Merge pull request #140 from soarqin/gridfs_fix

Fixed crash caused by wrong chunkSize read
Merge pull request #132 from RockLi/fix-hostname-length

Fix hostname length issue
Address initialization problems. Syntax fixes as I went.
Address initialization problems. Some minor fixes as I went.

From gerald-lindsly pull/130 merged manually
MAXHOSTNAMELEN for mongo_host_port.host

Fix for bad manual merge, thanks to Asya and Coverity for the catch
keep the unix EOL
Merge pull request #141 from fotonauts/unix_eol

keep the unix EOL
adding support for minkey and maxkey
Merge pull request #142 from fotonauts/minkey-maxkey-support

adding support for minkey and maxkey
merge
update