Make print const

Make Object::print method const and propagate const correctness accordingly.
Great to see that `const_cast` go away!