Whitelist more URL-y characters in digest parsing.

Android clients include a full URL instead of just the URI. Also handle situations where URLencoded bytes and document fragments are used.

Refs #3779