Merge pull request #24 from stoewer/master

Code format, copyright headers and comments
MetadataState: use state for selections

Introduce a new state `MetadataState` that is able to track selected metadata items in order to share this state between different components of the application.

Use `MetadataState` to connect TreeCtrl and TableCtrl.