Pakistan has bombed Afghanistan’s capital, Kabul, and other cities as fighting spread following attacks by Afghan forces against Pakistani military positions along their shared border earlier.