Lazily load profiler hooks

This gives a small (~3%) gain on rendering without profiling enabled, and cleans up the invocation graph a bit.