Store user_webdavauth users in DB + code cleanup

This commit introduces the storing of user_webdavauth users in the database which is a pre-requisite of https://github.com/owncloud/core/issues/12620.

Furthermore, I refactored the code and removed deprecated code, as a little gimmick I added unit tests for the backend.