Fix and refactoring mask_validator

Now mask_validator can be used with no active
record models

- Added normalize_value method to check if the
  object respond to <attribute>_before_type_cast,
  implemented only in active record objects