Allow for regular expression literals in the pattern attribute

Parse the value passed in for the pattern attribute and pull out the pattern and the flags.
This will allow for patterns to be passed in as regular expression literals with flags, and still work properly when passed to the RegExp constructor.

Pending this merge request
https://github.com/guillaumepotier/validator.js/pull/7