Remove `:code` attribute from VM state

Instead access the `:code` attribute of the `:fun` directly.
The `code` function provides a convenient wrapper for this.