How reasoning from social information facilitates efficient cognition