UK car production declined by 8.9% in July in a sign of slowing demand at home and in major European export markets.