Re-key a nested Hash to all-Symbol or -String keys. Rails 4+ backport.