Bangladesh all-rounder Shakib Al Hasan struck twice in an over to help his side take control of their ICC World Cup match with Afghanistan.