MOGADISHU — Somali government forces have regained control of a town on the border with Kenya after al Shabaab militants stormed an army base there on Monday, causing heavy clashes in which at least 17 people died, the military said.