Some typedefs for template specialisations to help swig

Swig (used for nix-java) seems to have some problems with inheritance from instantiated templates. The introduced typedefs solve this issue.

This is work in progress, please do not merge yet.