Fixed HABTM's CollectionAssociation size

HABTM should fall back to using the normal CollectionAssociation's size calculation if the collection is not cached or loaded.

This addresses both #14913 and #14914 for master.
pg guide, inet code example. [ci skip]
test, reset changed state in PG's uuid tests.

This resulted in some unrelated errors on Traivs:

  1) Error:
PostgresqlUUIDTest#test_treat_blank_uuid_as_nil:
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "thingy" of relation "uuid_data_type" does not exist
LINE 1: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNIN...
                                      ^
: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNING "id"

/cc @zuhao
Merge pull request #14992 from fredwu/habtm_relation_size_calculation_fix

Habtm relation size calculation fix. Fixes #14913, Fixes #14914.
test, regression test for unparsable PostgreSQL defaults.

This test was inspired by #14866. That PR would break this
functionality and we should make sure we notice that in the future.
set a constant for the "anonymous" habtm model fixes #15022

I wanted the middle model to be anonymous, but we have to give it a name
for marshal support. :'(
add more tests around the polymorphic url api
[ci skip] Minor improvements on routing.md.
Merge pull request #15029 from JuanitoFatas/docpatch/routing

[ci skip] Minor improvements on routing.md.
Change 'a' to 'an' [ci skip]
Merge pull request #15030 from mechanicles/a-to-an

Change 'a' to 'an' [ci skip]
add tests for the polymorphic_path method
add a test for classes with options
don't manipulate the testclass, just add helpers to the instance
add tests for path based url_for calls