Flush the entity manager when we delete a pool.

The deletes weren't executed until later, so creating new pools
still caused a constraint violation exception.