To make allocated_hugepages fact compatible with different Ruby versions
(1.9.3, 2.0) it's safer to return a hash as JSON and then parse to avoid
different types conversion
Change-Id: If7adadd2de2cc7154281a0d9cbadf825dffe5d2c
Closes-bug: #1572110
(cherry picked from commit fb899cc93c)