The Christian governor of Jakarta has been sentenced to two years in prison by an Indonesian court that found him guilty of blasphemy.