Afghanistan held their nerve to draw against Bangladesh as Sediqullah Atal's 111 after a marathon stay helped survive a tense final day in Abu Dhabi.