Cracking to curling transition in drying colloidal films