Add support for model transformer into the select2

This enables to transform back and forth between the hidden field representation and the model representation.