added a new set_readonly option

This adds a set_readonly option, to set the output structure readonly, deeply. The implementation is probably not great, please excuse my poor XS skill.

Reason for this code is that at $work, we need a way to protect users of deserealized structures against modifying it. Having this option avoids wasting time recursing on it.