Set foreign key constraints for ACL

Changed primary key on ACL table, used this to simplify permission
change queries.