Write thumbnails to database by tab id

Previous url based tab thumbnail update caused thumbnail changes
for the non active tabs that had the same url as the active tab.