use more efficient emptiness checking

Using empty() instead of size() can be faster. size() can take linear time but empty() is guaranteed to take constant time.
Merge pull request #49 from mscdex/master

use more efficient emptiness checking
Merge branch 'master' into node_0.11_compat

Conflicts:
	src/database.cc