Robust permission migration

Permission migration runs only when old permissions code is still
present. Also removes rake task for this.
Fix roles tests