Added custom frame support to Profiler

* Made use of it in the DatabaseBase classes
* For the xhprof class, this only works in HHVM for now

Change-Id: I95d7cc128d4a770328fbdd2b546972d3fc2e2e8a