Work on Windows

There are a few janitorial changes (copyright year, stray SOH character). Then there are a bunch of patches that split up the existing functionality into 3 modules where only one is platform-specific. There are a few commits that slightly break the compilation in that sequence as I was debugging via Travis and don't have a Unix machine available. After that, I added Windows support only for the size function, which I have tested and works great.