Fix PHP-1149 tests for invalid db/collection names

Restore max length check for DB names, which was inadvertently removed when v1.5 was merged in afdf28268d0f47855a9f1e0f68d4e6f8dd075294. The max length check was originally implemented for PHP-1149 in 908d7ee4c5b9f47df232a4e0fca91b1591fafc35.
Merge pull request #757