Split Profile class into Profile, ProfileBase and ProfileRunnerBase.

ProfileBase contains methods to manage profiling data.
Profile contains method to collect profiling data.
ProfileRunnerBase contains method to run code under profiler, except for
  "run" method, which name collides with threading.Thread class (more on
  this in a later commit).