Introduce custom deleter for job unique_ptr
We do job type cast which could be avoided if we changed the types returned from unique_ptr to unique_ptr with custom deleter. This would work nicely for the postgres scheduler implementation and would automatically return the jobs to the memory job pool without hacky raw pointer manipulation / deletion control logic.