playlist: port to prepared statement
librarytree: avoid some copying
db: port rest to prepared statement
db: drop unused things