initial version to support internal pointers

this allows almost all internal reference loops to be serializable
add unit tests for internal pointers
fix README error
Merge pull request #3 from 0xor1/dev

dev -> master