General stochastic separation theorems with optimal bounds. (June 2021)