Profile nested functions

This PR achieves pretty much the same as #31, but does that without any flags relying only on the fact that nested functions are constants in parent code.

As of now to make this work in case nested functions are executed outside of their parents one needs to wrap the benchmarked portion with `enable_by_count`/`disable_by_count` calls, because nested functions are not wrapped. This is fixable, but the fix is rather sophisticated, so I'd better post it as a separate PR.