Added profile program and corresponding configure options

Simple initial version. Doesn't do any actual profiling, but provides an easy target for an external time profiler (useful for profiling specific functions).