MDEV-4549 [PATCH] Clean up code working with ACL tables

enum values to index different ACL tables, instead of hard-coded numbers
(even different in diffent functions). Also factor out TABLE_LIST
initialization into a separate function.