webdav: fix locking in webdav_ucp::Content::getResourceType()

This commit cherry-picks 49a454225e35699d7351faaba3d296e1858c6107
for serf webdav version.

Change-Id: Ic5aba4fba8f8a2a521224b08865500dd932e85bf