US military commander in Afghanistan dismissed by President Obama