Characterizations of closed classes of Boolean functions in terms of forbidden subfunctions and Post classes