How long did it take the Emirate to become the Caliphate of Codoba?