DB: Use LENGTH() function instead of CHAR_LENGTH()

Use ```LENGTH()``` instead of ```CHAR_LENGTH()``` to get the size of
database entries. The latter is not supported in SQLite. The former,
however, returns the number of characters in SQLite instead of the
number of bytes as specified in the SQL standard.

Fixes #47.
Merge pull request #48 from owncloud/db_length_sqlite

DB: Use LENGTH() function instead of CHAR_LENGTH()