Support read-only collections and dictionaries

Closes #35.