oc_discovery: Add policy to filter endpoints
oc_discovery: Add policy to filter endpoints

When a client performs discovery, it is handed a
list of server endpoints in its discovery callback.
The client uses one or more endpoints from this list
to issue a resource request to the server.
These endpoints are conveyed by the “eps” parameter
in the oic/res response. Thus far, we were returning
all endpoints from eps to the client. But there
could be instances where an endpoint on the list is
simply not routable from the client. The client must
then invest time and logic to reissue requests to
another endpoint on the list.
So, this change adds 4 simple rules to filter
endpoints from inclusion into the list to raise the
odds of a client being able to successfully
communicate with the server on the first try.

Change-Id: I581adbbff921ad6084731b4f5c998a359a01576d
Signed-off-by: Kishen Maloor <c62ddea3cd661a9268bff15f07fc2229cdc9ac02@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/23771

iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained