Profile refactoring

Commits are mostly self explanatory.

However, there might be one more concern that could be addressed: name consistency.
I mean the source modules are named profile.{c,h} ; the conditional define inside the source is named PROFILE ; the Makefile option is DBG_TIMING. This is somewhat confusing...
If someone has some suggestions regardings the names, I'll update the pull request. Otherwise, it's good enough for me.