imaging: Add a function to purge imaging db for deleted computers
Refs #2190