Replaced RegExp support with functions in supportedLngs

Passing a function to supportedLngs makes it much more flexible. Any
function accepting a locale as a param and returning `true` if it's
supported or `false` otherwise will work.

Now the default behaviour should be the same as the original.

Added a helper function for validating against a basic locale pattern,
allowing any value like 'en', 'en_US', 'en-us', 'zh-hans-HK', 'ast',
etc:
`i18n.init({supportedLngs : i18n.checkLngFormat});`