Works towards fixing naming consistency and marking items as read.

If something claims to be siteId, it should be the siteId, not the
siteName, horror shock.
Going to try and use ID's all round instead of a mixture.
Must also try make all PHP return JSON.

This also fixes a bug where not all items would be marked as read.