Make print const

Make Object::print method const and propagate const correctness accordingly.