Preparing for Brexit has cost the UK government £97m in consultancy fees, the National Audit Office has revealed.