gr->get_building()

James,
I've implemented grund_t::get_building(), as discussed; thank you for explaining about factories, and I agree it makes sense not to use that function to return information about them.

This patch also includes the total_freight fixes.

Philip