Loofah-integration

Today Rails uses the HTML-scanner gem to do its sanitization. We will switch the gem that is used, while keeping the old API for backwards compatibility. Instead of the scanner gem, we will use Loofah. Loofah is built on top of Nokogiri, meaning we rid the implementation's reliance on regular expressions and we get speed. On large documents and fragments Loofah is around [60 to 100% faster](https://gist.github.com/flavorjones/170193) than the current implementation.

### Notes

The sanitizers used in `ActionView::SanitizeHelper` have been extracted to the rails-html-sanitizer gem.
https://github.com/rafaelfranca/rails-html-sanitizer

The `DomAssertions` and `SelectorAssertions` have been extracted to the rails-dom-testing gem.
https://github.com/kaspth/rails-dom-testing

The substitution values syntax in `assert_select` has changed.
```ruby
assert_select "div#?", /\d+/
assert_select "div:match('id', ?)", /\d+/
```
The attribute to match should be enclosed in quotes to avoid issues with Nokogiri's css selector syntax parsing. It is not necessary to do so with the question mark.

### Todos

- [x] Extract failing tests to mark them as pending.
- [x] Find areas where backwards compatibility is broken

##### Pending Test Fixes
- [x] Find out what causes `Output Error: Unknown Encoding ASCII-8BIT` three times in date_helper_test and once in form_helper_test. Related: https://github.com/sparklemotion/nokogiri/issues/553
- [x] Research the other failing tests

##### Sanitizers
- [x] Implement Action View `FullSanitizer`, `LinkSanitizer` and `WhiteListSanitizer` in `sanitizers.rb`
- [x] Deprecate `protocol_separator` and `bad_tags` for `WhiteListSanitizer`
- [x] Make `sanitize` accept custom `:tags` and `:attributes` options
- [x] Make `sanitize` accept a `Loofah::Scrubber` via `:scrubber` option
- [x] Make `PermitScrubber`
- [x] Make `TargetScrubber`

##### Sanitizers Testing
- [x] Add new tests in `sanitizers_test.rb`
- [x] Complete test coverage for `PermitScrubber`
- [x] Complete test coverage for `TargetScrubber`
- [x] Test behavior of changing sanitization
- [x] Move testing of `PermitScrubber`'s peculiarities from `sanitizers_test.rb`

##### Dom and Selector Assertions
- [x] Reimplement `assert_dom_equal` with Loofah
- [x] Move Dom and Selector assertions to Action View
- [x] Fix test_nested_css_select failing on line 245
- [x] Fix test_feed_item_encoded finding two p elements when it shouldn't
- [x] Marked as pending the colliding xml namespaces issue discussed here: https://groups.google.com/forum/#!topic/nokogiri-talk/Nv8kX4p_r7I

### Related issues

https://github.com/flavorjones/loofah/pull/44
https://github.com/flavorjones/loofah/pull/45
https://github.com/flavorjones/loofah/pull/46
https://github.com/flavorjones/loofah/pull/47
https://github.com/flavorjones/loofah/pull/51
https://github.com/flavorjones/loofah/pull/52
https://github.com/flavorjones/loofah/pull/54

//@rafaelfranca
You are right.