Learning the statistics of pain: computational and neural mechanisms