Added code that records interfaces defined by loaded plugins

Interfaces: functions, mappings, commands, …
Records much more information then will actually be needed; also writes DB too 
much times. No autoloading yet.