File locking save

This is the patch for https://github.com/jubatus/jubatus/issues/477 .

I tried to implement file-lock using gcc-specific extension and ``flock(2)``.


[Attention] This patch doesn't include regenerate code. (ex. ``*_impl.cpp``)