Fixed bindings for Metadata types other than simple typed data.

Also introduced new DataBinding.h header with dataToPython() method, to consolidate duplicated code from Metadata and Context bindings.

Fixes #1136.