Extracting the logic for parsing heap_size to Util.parse_ram_size_to_m

This is to allow future (and external) reuse of this logic. The exact
reuse I have in mind is implementing a method for -XX:MaxDirectMemorySize.
Merge pull request #8 from gid79/parse_ram_size

Extracting the logic for parsing heap_size to Util.parse_ram_size_to_m