Algorithms for finitely-presented groups and their quotients