Generate shallow paths for all children of shallow resources.

Prior to this commit shallow resources would only generate paths for
non-direct children (with a nested depth greater than 1).

Take the following routes file.

    resources :blogs do
      resources :posts, shallow: true do
        resources :comments do
          resources :tags
        end
      end
    end

This would generate shallow paths for `tags` nested under `posts`,
e.g `/posts/:id/tags/`, however it would not generate shallow paths
for `comments` nested under `posts`, e.g `/posts/:id/comments/new`.

This commit changes the behaviour of the route mapper so that it
generate paths for direct children of shallow resources, for example
if you take the previous routes file, this will now generate
shallow paths for `comments` nested under `posts`, .e.g
`posts/:id/comments/new`.

This was the behaviour in Rails `4.0.4` however this was broken in
@jcoglan's fix for another routes related issue[1].

This also fixes an issue[2] reported by @smdern.

[1] https://github.com/rails/rails/commit/d0e5963
[2] https://github.com/rails/rails/issues/15783

(cherry picked from commit e972d341209f64d1599e30a36b82eee2aa4cd553)

Conflicts:
	actionpack/CHANGELOG.md
[ci skip] Remove reference to getting started sample code.
Merge pull request #16082 from JuanitoFatas/4-1-stable

[ci skip] Remove reference to getting started sample code. (4-1-stable)
Partial back-port of c2d96d14 [ci skip]

[Juanito Fatas + Robin Dupret]
Merge pull request #16113 from egilburg/rails_4_1_upgrade_guide_json_time_with_zone_precision

[ci skip] Document millisecond precision change in ActiveSupport::TimeWithZone#as_json
Conflicts:
	guides/source/upgrading_ruby_on_rails.md