Effects of spatial training on transitive inference performance in humans and rhesus monkeys