Fixed PHP-896: Check remaining BSON buffer length before reads
Merge pull request #520
Merge branch 'v1.4'

Conflicts:
	bson.c