Apple shareholders have rebuffed an attempt to pressure the technology trendsetter into joining President Donald Trump’s push to scrub corporate programmes designed to diversify the workforce.