Add tools for profiling

* profile_merging profiles merging
* profile_parsing profiles parsing
FIX encoding of project file was not correctly detected

The regex that tried to match the encoding declaration was wrong. It is now fixed.
Use ANTLRStringStream instead of ANTLRInputStream

That removes the unnecessary StringIO buffer.