etcdserver: use Context to communicate timeout, and add tests