Team hopes findings will help improve equine welfare after showing cognitive abilities include being ‘goal-directed’