Fix failure to display subsequent pages in contacts

There is a bug in rcube_db::num_rows when used on a limitquery the query
has a record offset.

fix: removed all references to deprecated rcube_db::num_rows
replaced with db count where count is required (also less expensive).
removed counting where not required
Error when saving new contact

Fix: calling carddav_addressbook_sync  with null instead of false for
card_id prevents the sync to try an update on nonexisting card_id false.
replaced access to deprecated rcmail functions

functions found:
- get_table_name
- write_log
removed ORDER BY for count(*) query which caused an error
Merge pull request #1 from Finn10111/master

removed ORDER BY for count(*) query which caused an error
Encrypt passwords for carddav servers with user's password instead of static key
Merge branch 'crypto'