Code Refactor for deep_merge in activesuport/core_ext for Hash

Renamed variables + improved readability of a line in deep_merge code

Used divmod function instead of div and modulus in in_groups for Array

Refactored the deep_merge code more

Changed condition in in_groups function for Array + some other code refactoring

Fixed a small typo in string#classify example

Reinstating the earlier condition in Array#grouping