Ensure upgrading element fire attached in tree order

If elements are inserted and upgrading at the same time, explicitly call the attachedCallback before recursing into
children

Fixes #96

Add test

Add ordering test for detachedCallback
Merge pull request #98 from azakus/tree-order-upgrade-attach

Ensure upgrading element fire attached in tree order