French court hands down heavy sentences in teacher beheading trial