The relatively swift end to an attack on a Nairobi hotel and office complex highlights improvements in Kenya's counterterrorism capabilities since Somali militants overran a shopping mall in the same neighborhood five years ago.