Add test for duplicates, now to fix it
Rebuild StateRegistry storage so IDs across modules work

As it stands the following will fail as we didn't allow duplicate IDs
under any circumstances:

    with Pkg.installed("nginx"):
    	Service.running("nginx")

This commit changes the way the StateRegistry stores states to allow the
above example to work properly.

Now it behaves much more closely to the YAML + Jinja renderer.
Fix incorrect indent on else statement
Oops. 977d9ef was wrong. The indent was right the first time. Undoing.
Merge pull request #10839 from borgstrom/pyobjects_ids

Pyobjects ids