Huge rework of object management

To allow proper cleanup on exit, serious rework of object management
code was needed. Now BO handles are managed per file descriptor and file
descriptors are refcounted, so they can remain in memory even if the
application calls close before unmapping any related BOs.

In general this fixes all issues I have been able to find while running
X server and various Mesa demos.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>