Added multiple build configurations to support debug, release and profiling builds and switched to out-of-source builds.