fix access policy SQL migration

Now correctly adds 'reserve' permission for non-admin groups, and all
permissions for admin groups on non-shared systems.

The INSERT statements were also amended to avoid inserting duplicate
rules, so that they can safely be run multiple times or on databases
that have already been migrated before.

Bug: 1015328
Change-Id: I661953cee2eded42c86ea3bd75b1acc806024276