include/ipc: Allow passing multiple topics to ipc_endpoint_subscribe()
The ipc_endpoint_subscribe() function can only be used to subscribe to
one topic at a time, making error checking in scripts that subscribe to
more than one topic needlessly complicated.
This commit modifies the `ipc_endpoint_subscribe()' function so that
the caller may pass more than one topic. If any of the topics could not
be subscribed, the function will leave the endpoint in the state it had
before the invocation (that is, undo subscriptions that were made by
the same call).