Inform Arel that we don't need to cast a value in tests

Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
Go through normal where logic in `apply_join_dependency`

Part of the larger refactoring to remove type casting from Arel.