Output routes in :html format

By formatting routes for different media (txt/html) we can apply optimizations based on the format. We can include meta-data in the HTML to allow a rich experience while rendering and viewing the routes. This PR shows route helpers as they are used with the `_path` extension, it also has a javascript toggle on the top to switch to `_url`. This way the developer can see the exact named route helper they can use instead of having to modify a base. 

This is one example of an optimization that could be applied. Eventually we can link out to guides for the different columns to better explain what helper, HTTP Verb, Path, and Controller#action indicate. We could even add a route search box that could allow developers to input a given route and see all of the routes that match it. These are stand alone features and should be delivered separately.
Merge pull request #8499 from schneems/schneems/html-route-inspector

Output routes in :html format
Add migration example to Association Basics [ci skip]
Merge pull request #8432 from rmcastil/add_migration_example_to_each_association_type

Add migration examples to Association Basics

[ci skip]
Add missing require.

I was trying to use those files without Rails and that require was
missing.
Replace some global Hash usages with the new thread safe cache.

Summary of the changes:
 * Add thread_safe gem.
 * Use thread safe cache for digestor caching.
 * Replace manual synchronization with ThreadSafe::Cache in Relation::Delegation.
 * Replace @attribute_method_matchers_cache Hash with ThreadSafe::Cache.
 * Use TS::Cache to avoid the synchronisation overhead on listener retrieval.
 * Replace synchronisation with TS::Cache usage.
 * Use a preallocated array for performance/memory reasons.
 * Update the controllers cache to the new AS::Dependencies::ClassCache API.
   The original @controllers cache no longer makes much sense after @tenderlove's
   changes in 7b6bfe84f3 and f345e2380c.
 * Use TS::Cache in the connection pool to avoid locking overhead.
 * Use TS::Cache in ConnectionHandler.
Fix failing test in railties

Related to the HTML route inspector changes:
ae68fc3864e99ab43c18fd12577744e1583f6b64
Revert "Clear url helpers when reloading routes"

This doesn't actually remove old url helper methods as they are
defined in a different module.

This reverts commit 96bcef947bf713b7d9fc88f26dff69f568111262.

Conflicts:
	actionpack/CHANGELOG.md
Clear url helper methods when routes are reloaded

Remove all the old url helper methods when clear! is called on the
route set because it's possible that some routes have been removed.
Removed :if and :unless from fragment cache option in favour of

cache_if(condition, option, &block) and cache_unless(condition, option, &block).

In the PR #8371 was introduced  conditional options :if and :unless in
the cache method.

    Example:

      <%= cache @model, if: some_condition(@model) do %>
        ...
      <%end%>

This is a good feature but *cache_if* and and *cache_unless*
are more concise and close to the standard of rails view helpers
(ex: link_to_if and link_to_unless).

    Example:

      <%= cache_if condition, @model do %>
      ...
      <%end%>
Merge pull request #8497 from acapilleri/conditional_cache

Removed :if / :unless conditions to fragment cache in favour of *cache_i...
Fix for has_many_through counter_cache bug

This commit fixes reported issue #7630 in which counter
caches were not being updated properly when replacing
has_many_through relationships
Improve the documentation of cache_if and cache_unless
Merge pull request #8400 from matthewrobertson/has-many-through-counter-cache

Fix for has_many_through counter_cache bug

Counter caches were not being updated properly when replacing
has_many_through relationships.
Remove AR gem pushed by mistake
Merge pull request #8510 from thedarkone/thread_safety_improvements

Thread safety improvements
remove a cache we do not need