Oil extends gain on vaccine hope, weak dollar