Microsoft overhaul treats security as “top priority” after a series of failures