m_xline_db Major enhancements

- Save database on a timer, not on every single change
- Use the internal database instead of keeping track of xlines ourselves
m_xline_db Fix pointless excessive stack usage in ReadDatabase()