virttest.staging.utils_memory: strengthen get_num_anon_huge_pages()

This function is intended to obtain the AnonHugePages usage of VM.
Sometime, we want to get the AnonHugePages usage of Host,
so this patch can achieve this purpose.
Originally, This function was wrote by me.
it's used by tp-libvirt#347.
Now, i want to to enhance it.