A theory of elementary higher toposes