Variational principles for topological entropies of subsets