rt: get rid of rust_fn and replace with fn_env_pair plus a little cleanup.

Closes #1190.

Also, got rid of `rust_ptr_eq` since it isn't used any as well the `RUST_REFCOUNTED` macros.

Takes care of the wrong structure part of #2667 but not sure of the alignment bit.