Raise an exception when Hash::get() receives invalid parameters

I'm not sure on whether this is a problem with my local app but I have
seen it a couple of times in a couple of projects: Warning (2): Invalid
argument supplied for foreach() [CORE/Cake/Utility/Hash.php, line 52]

I think Hash::get should be able to handle this better rather than
throwing an error in a core Util file.

Refs #3754
Add test for #3754
Merge branch 'patch-2' into 2.6

Refs #3754