Don't segfault on invalid utf8 while sorting

`strmblen` returns -1 on invalid sequences, which causes a segfault when passed as length to `stpncpy`.
Merge pull request #49 from mheijkoop/unicode-sort-segfault

Don't segfault on invalid utf8 while sorting
Preproc defines in evhttp_compat.h to protect against double inclusion
Add db interface to update the admin table
Add trimwhitespace(), keyval sorting and alloc to misc functions
- features required by the LastFM module
Support for LastFM scrobbling (issue #19)
add caching of artwork images
fix wrong artwork cache path
check if artwork file is already cached