got rid of total_heap_size metric because it is no longer supported by webkit

Also rewrote a bunch of the webkitclient methods using a helper to make it more concise.