Cleanup properly init_profiler and clear_stats
Cleanup properly init_profiler and clear_stats

If one of the allocations in init_profiler failed, we would leak all the
allocations before the failure.  After clear_stat, danling pointers to
current_ctx and prev_ctx were left, and ycurfuncindex was not cleared.

Now everything is cleared in clear_stats, and allocations are cleaned up after
failure in init_profiler.

yousong/yappi,yousong/yappi