(CDAP-694) Code cleanup for deployment pipeline

Refactor deployment pipeline to have ProgramClassLoader created at the beginning of the pipeline and cleanup when the pipeline is completed.