make sure accessor creation is thread safe
Merge pull request #1146 from realm/al-accessors

Make sure accessor creation is thread safe