Eliminate duplicate getPreviousBuild functions

And move some stuff into CatalystUtils for use by other plugins.

Created by  Eelco Dolstra  on June 27, 2013
RPTSGIRCCSEDEBRB5H465A5JULJH5KFYAMR573SKNTPSJSCYEICQC
Change contents