Refactor subversion branch models.
Fix slowness for job list page to use inner join query.