Moves the system to an SQL based one. Loses one global var/list as a
result, and should speed up startup for servers with massive item lists.
It can probably stand to be improved, and made more generic, but this
suffices for now.
You'll have to tie exceptions to it like you did with the last system. I
tried to amend this with further information in the table, but it got
difficult, and may have stretched code to unnecessary complexity.