At least 17 people have been killed by a car bomb outside the central Iraqi town of Khalis, officials say.