Improve memory handling of exceptions

general cleanup
inlining HandleCommand()
make DoUnlock()
swap pair of lists  (one for source keys and one for restrictions/exceptions) to a pair of lists (strided list for sources/restrictions and strided list for AvID/exceptions)

This was a 2-way merge, my changes were based on a slightly older version that the script in HEAD.  Apologies to anyone concerned if I pooped on your changes.