Ring wormholes and time machines