Add keyval sorting and alloc to misc functions
Use misc/keyval to store parameters (instead of custom handling)
Working LastFM scrobbling (alfa), based on libevent https client