add start/stop hooks for server

by default they do nothing, but you can override them to implement
whatever logic you need