[Cherrypick] XD-1319: metadata mixin

This builds on top of https://github.com/spring-projects/spring-xd/pull/588

Turns out there is a very simple way to add the mixin functionality, that I'd like to see merged in before going further with XD-1378, as a lot of modules share common behavior.

Only the last commit (2a11236 at the time of writing this) is to be included if the other PR is already merged in.