Replace SV_DECL/IMPL_REF macros with SvRef template

Change-Id: I0ef2e67f6d61e0ce118c0f5e926b8194ef9d8058