Germany has reached an agreement with Namibia that will see it officially recognize as genocide the colonial-era killings of tens of thousands of people and commit to spending a total of 1.1 billion euros ($1.3 billion), largely on development projects.