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.
directory, db: fix check for empty list (silly me).

Also fixed (I think) some referene leaks.
directory: many fixes (cause I'm a baka).

1)Actually free dir_handle (add directory_handle_free), before this
there're no dir_handle been freed.

2)Fix unref(), atomic_fetch_add returns value before add.

3)Fix misuse of directory_delete, directory_delete is used to unlink
directory from its parent, not for free directory with zero ref_count.

4)Fix misuse of ref_get in directory_free.