unit: Add initial SDP library unit tests

These tests will cover all public SDP library API not covered yet by the
tests in test-sdp.c (which focus on the SDP server).
lib: Add SDP_IS_ALT() macro

This macro will simplify internal SDP library code, and is similar to
the existing SDP_IS_SEQ() macro.
lib: Reuse identical code in sdp_get_{add,}_access_protos()

sdp_get_access_protos() and sdp_get_add_access_protos() do almost
exactly the same thing, except for an additional statement for the
latter.
lib: Cleanup coding style in sdp_get_proto_descs()
lib: Fix missing DTD validation while accessing SDP data elements

It is necessary to validate the sdp_data_t "dtd" field before accessing
the "val" union members, specially when handling SDP_SEQ*, SDP_ALT* and
SDP_STR* elements, otherwise remote devices can trigger memory
corruption by passing invalid data elements where others are expected.
unit: Add tests for sdp_get_lang_attr()
lib: Add missing DTD validation in sdp_record_print()
lib: Validate DTDs when parsing LanguageBaseAttributeIDList

Also check if the required number of entries is present.
lib: Validate DTDs when parsing BluetoothProfileDescriptorList

The "seq->val.dataseq != NULL" check is also removed from the for()
statement because it should be done after verifying that the data
element is a sequence (inside the "if (SDP_IS_SEQ(...))" block.)
lib: Add comment to BluetoothProfileDescriptorList parsing workaround

Commits 0f5a5a9580084a3c4e0644ef5cd75689aeb5ff40 and
46b3a3d2d00bf70bc57ef0c9ad5542a2271e3350 introduced this workaround.
lib: Validate DTDs when parsing VersionNumberList
unit: Add tests for sdp_get_profile_descs()
unit: Add tests for sdp_get_server_ver()