Global effective-field-theory analysis of new-physics effects in (semi)leptonic kaon decays