PHP 694: split out types and gridfs classes into their own files