Add missing locks for registering/unregistering I/O
Add missing lock for table creation

It may fix a crash bug of mroonga:
https://gist.github.com/y-ken/9a5d564d37a58e810abe

Reported by Y.Kentaro. Thanks!!!