Period function's convexity for Hamiltonian centers with separable variables