Make the application name snake cased when it contains spaces

The application name is used to fill the `database.yml` and
`session_store.rb` files ; previously, if the provided name contained
whitespaces, it led to unexpected names in these files.

Since Shellwords.escape adds backslashes to escape spaces, the app_name
should remove them and replace any space with an underscore (just like
periods previously).

Also improve the assert_file helper to work with paths containing spaces
using String#shellescape.
Merge pull request #12606 from robin850/apps-with-spaces

Make the application name snake cased when it contains spaces
Fix order dependent tests
stop using `send` so that method privacy is respected and we get a small
perf increase
use the provided block to filter lists
do not search through the keys array twice
this should be private, no other instances of Root should call it
Try arel master

Conflicts:
	Gemfile
test cases to describe the MySQL boolean behavior.
Unifies mysql and mysql2 casting of booleans.