Harry Potter author JK Rowling has apologised to the family of a wheelchair-bound boy for tweets in which she accused US President Donald Trump of ignoring his proffered hand at a media event.