Fixing bug in mongo_validate_ns()

At collection length validation, 'current' point a byte ahead.
This bug make ns validation fail if ns has single character collection.
Allow Makefile accept env variables (for compatibility with rpm and deb package builders)

DESTDIR is the root by default
PREFIX is /usr/local by default (may be different or some OSes)
bug fix: conn->primary was not allocated
Merge pull request #60 from gerald-lindsly/master

Replica set allocation error in mongo.c
fix makefile for env consolidation
Merge pull request #61 from gerald-lindsly/master

Fix makefile for env consolidation
Merge pull request #58 from vintozver/master

Makefile changes to allow changing install dir
Merge pull request #57 from scari/master

Fixing bug in mongo_validate_ns (CDRIVER-185)
 CDRIVER-185 Not properly validate if Collection has single-length name.
CDRIVER-177 Sigpipe is not caught on os x
CDRIVER-182 C driver 0.7 release - add bcon to lib build for scons
add static to functions that are not declared and only used in the current file
Merge pull request #62 from fotonauts/static_functions

add static to functions that are not declared and only used in the curre...
don't mix up int and size_t (first pass to fix that)
CDRIVER-187 C driver 0.7.1 release
CDRIVER-187 C driver 0.7.1 release
Merge pull request #63 from fotonauts/size_t_64_bits

don't mix up int and size_t (first pass to fix that)
should be static, but it used by test files
forgot that too...
don't crash if the bson has no data (like bson_init() and bson_finish())