Bug 906101 - Move tier make logic into own .mk file and don't use from rules.mk; r=glandium

The existing tier traversal logic is only used in the top-level Makefile
but was present in rules.mk. This meant it was getting evaluated for
every Makefile. This was silly and thus the logic has mostly been moved into
its own .mk file and is only included for the root Makefile.