Support zero downtime restarts

Getting the ball rolling for #261. Seems to work well for me, but I haven't tested it in production yet.