Add static_assert()
buf: Add buf_retain()
Improve blobcache

Write to disk in a separate thread to avoid blocking callers if flashs are slow
Make index storing much more robust
osx: Fix libspotify build