Also move normalize_whitespace and to_regexp into Capybara::Helpers, and improve method documentation. I'm not adding tests for the helpers. I think they're so simple that we really only care whether they work in conjunction with other methods, like Node#text.
This is mostly for compatibility with Capybara 1.1.2.
With browser-based drivers, the has_value?, has_select?, and has_checked_field? matchers (and their negative counterparts) did not always work correctly. It is not possible to determine the dynamic state of inputs purely with XPath, because XPath has access only to the value, selected, and checked _attributes_, and only the corresponding _properties_ change in response to user input. This commit replaces the pure XPath implementation with one that retrieves all matching inputs and then filters the results using driver-specific means that do reflect user input.