Refactored xhprof getFunctionReport() to use getFunctionStats()

* Also added more doc comments to getFunctionStats()

Change-Id: I3741713d3c80b0bbc622eb17ce4c3a047bf5a06c