Berlin court rules far-right party has to return record sum it accepted illegally ahead of last year’s election