Long-running BBC Scotland soap opera River City is to come to an end next year after more than two decades.