Add swipe support for mobile scripts (fix #3989)

Fixes regression caused by #3989.  There are also some formatting fixes that I've noted.
@jlipps Eg, it works when driver.exec("mobile: swipe", opts) is invoked.  My code doesn't work with exec without a lot more boilerplate and I feel like I've added too much already.