Improve quality of editing timeslots

The main impetus was the invalid HTML by putting a <form> directly
inside a <tr>, which isn't cool. It was breaking the form. So this fixes
that.

It also adds tests and makes the form post back to the same page and
select the timeslots tab automatically.