Profar to A’s in 3-team deal with Rangers, Rays