The head of the top civil servants’ union has accused ministers including Theresa May of failing to defend the independence of its senior mandarins following the resignation of Sir Ivan Rogers as Britain’s ambassador in Brussels.