Fixed memory leak
Line wrapping cleanup
Cope with realloc failure a bit better
Reworked to use flexarray instead of normal arrays

Results in much less memory allocation, although could still be better (should increase the size of the bins dynamically)
Removed trailing new lines from pdf errors
Use dstr_append, not printf, where appropriate
Added vim modeline

Prevents me messing up the formatting
Updated top-level libary description
Updated licensing details