canCreateInstance() method for type serializers

In order to move to the Kryo serializer for generic type serialization, a canCreateInstance() method is necessary. @tillrohrmann already did this in a private branch. I rebased, cherry-picked and reviewed it and updated the new serializers.
Might be better readable to have both checks in the same format, i.e. either both as branches or both ANDing.