configure: -Werror=incompatible-pointer-types
new db, directory: new directory api

Don't export struct dir to outside.

Also playlist_vector.c, database.c and a some parts of the db plugin is merged
into directory.c. There is where they belong.

Currently there're many places leaking the dir_handle. Gonna fix them
later.

And a note here: the directory_ prefix should be changed to vfs_.
player, decoder: fix playing.

Also creates more leaking.
build: fix build with debug enabled
ref_count: Add a rough debugging support.

This debugging support is very rough and inaccurate, and add a huge
overhead.
directory, db: fix a dir_handle reference leak.
directory: fix several reference leaks and crashes.
directory: a temporary solution for debugging reference leaks.

Do not use reference counting when debug is enabled, so valgrind can
correctly detect memory leaks.
db, simple_db: remove a redundant db_lock
directory: fix potential reference leak.