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. - Especially considering that some people are using this as reference implementation for an authentication backend I consider it important that this code follows best-practises.

@MorrisJobke Please review.

@karlitschek Thought you might like that since you created that app. Care to review as well? - Don't worry, most of the change are unit tests :-)