RegExp: fix match count computation

 * There actually is a way to count the matches, so use it instead of
attempting to guess
 * In some cases (when using optional groups (xxx)?, for example), there
may be a non-matching group (with offsets set to -1) and matching groups
after it, so the binary search wasn't quite working
 * Instead, we always return the number of capturing groups in the in
the given expression, which is the maximal number of matches. Some (or
all) of these may not have any content. We do return 0 matches on any
error, including when the regular expression didn't match anything.
BUrl: use a regex to parse URLs

 * The RFC provide a regular expression for URI parsing, so just use it.
 * Allows parsing URIs with missing components (no scheme or authority)
 * This allows to parse relative URLs as expected
 * Can also handle things such as data: or mailto:
 * Also more fixes to handling of incomplete URIs, some flags weren't
always set to the right values.

This gets Windows Live Mail (or is it called Outlook?) working, with
some other fixes on WebKit side.