At least 16 people have been killed in Pakistan after a vehicle carrying explosives rammed into a police compound and a gunfight broke out.