Clean up functor function declaration
Added tests for the reference boxing/unboxing. Added overloads to box_ref and unbox_ref are aware of Ref<T>