Former Brazilian President Lula da Silva has been sentenced to nine and a half years in prison over charges of corruption and money laundering.