add management command to rebuild all cases in a domain

also adds functions to list case ids / cases by domain