Clean up `generateNewConfigFromFlags` function
Clean up `generateNewConfigFromFlags` function

split validate/set code with helper function to reuse later.

warmchang/minikube,warmchang/minikube,warmchang/minikube,kubernetes/minikube,kubernetes/minikube,kubernetes/minikube,kubernetes/minikube,warmchang/minikube,warmchang/minikube,warmchang/minikube,kubernetes/minikube,warmchang/minikube,kubernetes/minikube,kubernetes/minikube