Fix ldap sqlite n js

Fixes two things:

1) sqlite compatibility with clearing the mappings (→ emptying a table). sqlite does not understand TRUNCATE.

2) fixes a regression in master when applying values to configuration UI. The "Configuration Active" checkbox was not set correctly because of failing string-int clash in the comparison.