Merge pull request #17245 from sferik/sample

Replace Array#shuffle.first with Array#sample
Merge pull request #17246 from sferik/railties_first

Start running railties builds first, since they take the longest finish
Merge pull request #17234 from arthurnn/add_regression_for_path_and_cascade

Add regression test for router was overwriting PATH_INFO
fix test_helper for mountable plugin
Merge pull request #17240 from masarakki/fix-test_helper-of-mountable-plugin

fix test_helper for mountable plugin
remove unused tools/profile
Merge pull request #17247 from igas/fix-deprecations

remove unused tools/profile

We usually use moderns tools like benchmark-ips so we don't need this anymore
Merge pull request #17230 from robertoz-01/master

atomic_write rescue also Errno::EACCES
Revert "Merge pull request #17247 from igas/fix-deprecations"

This reverts commit 997f1575f78bf6a2d12b8665a55807d51fe964df, reversing
changes made to f919d5f5ea75f0e56a57643e5a0472367a98625f.

See https://github.com/rails/rails/pull/17247#issuecomment-58895078
Document the propose of tools/profile
Do not use deprecated `exists?` method
Make a note about the internal tools/ dir and what each utility does
line_statistics is not an executable

Also add documentation on it
Autosave callbacks shouldn't be `after_save`

068f092ced8483e557725542dd919ab7c516e567 registered autosave callbacks
as `after_save` callbacks. This caused the regression described in #17209.

Autosave callbacks should be registered as `after_update` and
`after_create` callbacks, just like before.

This is a partial revert of 068f092ced8483e557725542dd919ab7c516e567.

Fixes #17209.
Merge pull request #17232 from Agis-/issue-17209

Autosave callbacks shouldn't be `after_save` callbacks
add length to ActiveRecord::Result
Don't need to account turbolinks cookies in get request.

It was changed to not set the cookie in get requests at
https://github.com/rails/turbolinks/commit/62cc3db457ad9745ccda047dd43ab84fb3d89707.

Related with dcb05f26.
Always use latest turbolinks
measure record instantiation time in AS::Notifications

emit an event when we instantiate AR objects so we can see how many
records were instantiated and how long it took
Remove duplicate error message "Couldn't find..."

This commit removes the duplication of the error message:

> Couldn't find #{@klass.name} with [#{arel.where_sql}]

introduced in #15791 by adding a private method `find_nth!` that
deals with all the method like `first!` and `second!`.