add iframe onload handler for profiler

- moved initializer to happen when iframe loads
- create custom directive for handling iframe onload

@seanbrookes please review