This broke my build machine, because lightningd --version was malformed
(I had no tags somehow in that branch).
I dived into the code to figure out what was wrong, and I was horrified.
1. STOP. Never write this much code.
2. You just need a NodeVersion class. That's it. No others.
3. Don't throw away the entire first part if it starts with 'v'. Just remove the v.
4. Handle untagged versions cleanly.
5. Always fail on invalid strings in the constructor, NOT on the first time you
use it.
I have rewritten it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>