Move validation to its own package
Purpose of this PR is to allow importing of types without creating import cycles between types and ocppj. Root cause is the shared validator which originally lives in ocppj.
An alternative approach would be to move the validator to types. However, that would lead to packages importing types that otherwise wouldn't need to do so.
The original motivation for doing so was https://github.com/lorenzodonini/ocpp-go/pull/145. I've implemented that without resorting to using types, so strictly speaking this PR is no longer necessary. Please feel free to close if this introduces too many changes.
I've also added handling of registration errors, i.e. panic.
Formatting changes are due to the go fmt updates of Go 1.19.