Make schema generation aware of registered custom type

As in example with doco (SecurityRole>String) it would crack
currently in a moment you try to use autogenerated schema for POJO
for reasons like adding index.
Merge pull request #2534 from cstamas/schema-and-custom-datatype

Make schema generation aware of registered custom type