Refactor GainSchedule.

Simplify set_rate(), prevent extra data copies in gain_schedule.cpp.