AttributeRef/StateRef: fix two small bugs

Attribute ref was setting the debug info, even if not provided, at
object creation. This led to misleading behavior for UnnamedAttributeRef
objects when the position was changed. E.g., it would be created as
pos=6, debug=$6, then pos would get changed to 2. Now, leave debug_info
alone if not provided and add the $ on print.

UnnamedStateAttributeRef did not implement all needed methods
UnnamedStateAttributeRef: test

It was not covered by the existing tests
Merge pull request #285 from uwescience/minor-bugfixes

AttributeRef/StateRef: fix two small bugs