Cleanup
Added CustomPatternBase class, so that its inheritors would be containers for pattern registration information. They should have some public static fields by convention. CaretPositionPattern moved to this implementation.