tag: Improve tag property::index support (FS#1229)

This try to solve "index" not being in sync when using dynamic tagging. It look scarier than it is. The "index" feature is not really working, so it should improve it. As seen last time I played with this code, some people have very funny hacks using it, so we never know, it might break a thing or two, but I don't think so.

* Move the "index" setting burden to individual functions
  instead of gettags().

* Add some properties earlier so the signal hooks will be called
  with valid data.

* Fix a minor issue with restoring history when changing screen, won't really happen as most people move only selected tag, but it was there anyway, so better fix it.

From a complexity PoV, it remove some loops from gettags() and move them to add/remove/move/setscreen. As gettags() is called way more often than any of those, it should make Awesome a little faster too, but it's not the point.

I am not so sure every corner cases are fixed, but all I could find seem to be. If possible, have some third party testing in master and eventually move it to 3.5.*

**Testing done:**

* Tested with my Radical.impl.taglist widget in pure "property::index" mode. It now work and was broken before
* Tested with Tyrannical, so I created/deleted/moved a lot of tags and it seem to hold so far.
* The default config load
* Tested with Collision ctrl+alt+shift+arrow

**Testing not done:**

* Using shifty / eminent
as "index" can now be nil when called by setscreen, (tag.getproperty(a, "index") or 99999)
will be necessary or something like that. Better yet, store the the tags in a cache. Gettags is called a lot.