Improve register{Added,Removed}FileTag.

- Do not do double hash look-up.
- Do not leave empty lists in the hash.

Change-Id: I09c6c0917fc4b97032a4a48ba62419d9ebd236e5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix restoring product build data.

- The main problem was that the leaf rule/root rule connections were
  done before all product build data was restored, leading to the
  "enabled == true <=> build data != null" invariant being broken,
  which resulted in a crash (only triggerable with release builds).
- In addition, the FindRootRules visitor connected too many rules, as
  it descended into child rules.

Change-Id: I2fd575ed6c41ad29cc20ea651f4388880ef86634
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>