ComInterface construction from ptr adds ref

Failure to add a reference to the underlying interface whenever a media
collection was requested in the media project, meant that they sometimes
go garbage collected before the callee was able to make use of it,
causing segfaults every now and then.
Addes saving and loading of grammars

You can now save and load entire grammars to and from files, saving
loads of time when dealing with complex generated rules like the PlayBy*
events in the media project.
Added grammar files to gitignore