update history
Fix pid file cleanup when running on ruby 2.0

- only spawn a server thread in the foreground mode
- at_exit handlers called from a thread in a forked
  process in ruby 2.0 appear to not be called.
- Closes #15, Closes #16