Add two SQL functions for extracting timetables from mca

Added get_train_timetable and get_full_timetable functions to the
mca schema which retrieve the timetable of a particular train or
all trains on a given day, accounting for the effects of permanent
and short-term plan changes to schedules and for the fact that
not all trains run on all days of the week.