Add new locator to find elements matching a regex

Locator takes two parameters: a CSS selector, and a string or regular
expression to match. (The CSS selector is needed because a DOM element
contains the text of all its children, so matching without a CSS
selector could match every div all the way to the document root.)