Add support for URL-safe encoding

RFC 4648 compatible URL-safe encoding with optional padding stripping.