re-raise error if error occurs before committing in streaming

update the tests, using an if-else
Fix assertions
format ActiveRecord CHANGELOG. [ci skip]
fix `number_to_percentage` with `Float::NAN`, `Float::INFINITY`.

Closes #14405.

This is a follow-up to 9e997e9039435617b6a844158f5437e97f6bc107 to restore
the documented behavior.
`where.not` adds `references` for `includes`.

Closes #14406.
Merge pull request #14090 from Fortisque/kevin/stream_error_in_main_thread_if_not_committed

re-raise error if error occurs before committing in streaming