Extension hooks and skeleton of phongo, and basic bson implementation

`proto` consistency here and rest of file.