Use DistributedLock in materialized views refresh

- Copied from
  https://github.com/alphagov/transition/blob/master/lib/tasks/import/whitehall.rake#L17-L19
  based on advice from Jenny that we should do this so it doesn't run on
  every machine.
Merge pull request #479 from alphagov/use_distributed_lock_for_materialized_views

Use DistributedLock in materialized views refresh