Add tab model reload tests

- updateInvalidUrls doesn't need to write invalid title to the database.
  That was causing url to be wrong in cases after this one.
- updateValidUrls and updateTitle need to wait url to be
  written to the database.

This PR contains two commits. First one fixes title update to be targeted to the correct link id. Second commit adds unit tests for tab model reloading (see also https://github.com/sailfishos/sailfish-browser/commit/919995242d8f08e9cef3a56faf233f61c36ed19f).