Process daemon

I modify script/crawler to use Process.daemon instead of manually forking.
Additionally I make some refactoring and fixes.

Note that this PR kills a support of ruby < 1.9.x.