add regression test for the case where we had a "recursive data structure" in the attachment properties
fix attachment dictionary recursively
Use "test_attachment" instead of "attach" for test attachment name, since was confusing.  Also put test attachment name in a constant.
Add testLiveQuery() which uses a LiveQuery in the usual manner.  Currently fails due to apparent bug in code.

I didn't understand how the iOS TestCase(API_LiveQuery) works after glancing at it (maybe I should talk to Jens to try to figure it out), so for now I created a whole new testLiveQuery() which is the "normal" way to use a live query.  Left failingiOSPortTestLiveQuery() in for now, disabled.  Need to figure out if it's a valid test, and if so, re-enable it.
Add comments to further explain test, change timeout to 1 second.
Add comments to tetLiveQuery to explain how it works
Fix LiveQuery, which was completely broken due to name collision with param and instance variable (*facepalm*).  This breakage was demonstrated by testLiveQuery(), a basic test that was failing before this fix.
minor improvement in RevisionInternal.getPropertyForKey
fix updateIndex when value is null in emitBlock