Correct the length of base64 digests

This was broken in e42b5d09. This makes adobe auth against
akamai servers work again.
Only use one challenge value in adobe auth

Some servers (akamai) only include a 'challenge' parameter, no
'opaque' parameter, while others (wowza) include both 'opaque'
and 'challenge'. If 'opaque' is provided, it should be used here,
otherwise 'challenge', but never both.

After this patch, adobe auth works against both wowza and akamai
servers.
Remove a useless leftover comment

The variable is any random challenge, thus the byte order doesn't
matter at all.
Don't use non-public gnutls functions

The internal functions gnutls_calc_dh_secret and gnutls_calc_dh_key
have changed signature in recent gnutls versions - don't use them
but manually do roughly the same as what they used to do before
using only public API functions.
Don't do strchr on a string that isn't necessarily null-terminated
Fix limelight authentication with abbreviated app names

When streaming to limelight, the app name is either a full
"appname/subaccount" or "appname/_definst_". In the latter case,
the app name can be simplified into simply "appname", but the
authentication hashing assumes the /_definst_ still to be present.
Include the nettle/hogweed crypto libraries in the pkg-config file

These libraries are linked and used as directly as we use gnutls
itself. This fixes linking for callers if librtmp is built
statically or if the linker doesn't support transitive linking.
Include -lgmp in the pkg-config file when building with gnutls

This is required when a user of librtmp is linking statically to
librtmp (when it is built with gnutls support).

Ideally everything of the Requires line should be in
Requires.private, and -lgmp would go into Libs.private - but if
only building a static lib, they should go where they are right
now instead. Keeping all of this where it is right now, for now,
for simplicity.
Bump the SO_VERSION to 1

Commit a9282329c3 changed the layout of the RTMP struct, making
it ABI-incompatible with previous versions.
Correct the count of bytes written to the initial FLV buffer

This matters if the buffer overflows, when the count is used
for patching the buffer back together. This happens if there
are multiple video packets with zero timestamp at the start
of the stream (before any audio packets), enough to fill the buffer.
Free the extra read buffer if the initial FLV buffer overflowed

This fixes a leak in this cornercase.
Fix leaks in AMF objects that contain arrays
Merge remote-tracking branch 'upstream/master'
Make DecodeTEA() work on big endian systems