Fix PHP-1149 tests for invalid db/collection names

Restore max length check for DB names, which was removed when merging #756 for PHP-1265.