Purity estimation with separable measurements