Senegal beat Morocco to claim their second Afcon title despite walking off the pitch after a late penalty award which also sparked chaos in the stands.