Rewritten NSI_UNIQUE_ID system to get rid of the cross-database interreg dependency

- Removes the need for map-server to access the interreg table to store the last used ID.
- Login, char and map databases can now be hosted separately.
- Note: the unique_id structure has changed, and it now contains the generator character ID in its upper 32 bits.

Special thanks to Haruna.