handle client protocol lists properly

We fail to deal with lists of protocols sent by the client
by picking one from the list properly.  This fixes that and
adds protocol lists to the test client for regression testing.

Signed-off-by: Andy Green <andy.green@linaro.org>
2 files changed