Lazily load profiler hooks

This gives a small (~3%) gain on rendering without profiling enabled, and cleans up the invocation graph a bit.
I think breaking backwards-compatible for the profiler is okay, probably nobody uses this except for us and maybe the guy who wrote it :)