Cleanup examples.
Merge pull request #628 from realm/cm-examples-with-close

Example cleanup
Merge branch 'master' into cm-utf8-test

* master:
  Cleanup examples.