Add new device_id field to login tokens

This will be used by WebLogin to pass the authenticating device
identifier through to the WebKDC.  Add the field to the login
token encoding and to all of the various tests, and adjust the
test suite construction of login tokens to account for the extra
field.  Pass through a value in multifactor tests in preparation
for further tests that actually use that field.

Change-Id: I00cfbe3ed3ebe57294c8caa4c0e1041301e21577
Reviewed-on: https://gerrit.stanford.edu/1607
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Recognize more failed login error codes from Kerberos

Recognize KRB5_BAD_ENCTYPE, KRB5_GET_IN_TKT_LOOP, KRB5_PREAUTH_FAILED,
and KRB5KRB_AP_ERR_MODIFIED as additional synonyms for a failed login
error code.  Various combinations of recent MIT and Heimdal with
different KDCs return these error codes if the password is incorrect.

Change-Id: I7d6e3621d497ce1c74924e058aebc5ff388ee332
Reviewed-on: https://gerrit.stanford.edu/1608
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Change the protocol for returning device information to WebLogin

Use more, separate XML elements to better match the information
model returned by the user information service using JSON, instead
of collapsing everything as attributes.

Change-Id: I9916fe0be77ccd189c6527576b10257c781ff854
Reviewed-on: https://gerrit.stanford.edu/1609
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Add support for default and device info in userinfo calls

In the JSON implementation of the user information call, add
support for reading default device information and the list of
configured devices.  Add support for passing in the device ID
for validate calls, and pull it out of the login token.  (This
field is ignored with the old XML protocol.)

Change-Id: Iffadd85499024000b459dada843de29a1b9462ed
Reviewed-on: https://gerrit.stanford.edu/1610
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Bump Perl module version numbers

Change-Id: I604384d7ec83f55933bcf5656eecf309cb8d1a3b
Reviewed-on: https://gerrit.stanford.edu/1611
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Provide the device and default factor information to WebLogin

Pass the device information and default device through from the
user information service to the response to a WebLogin
<requestTokenRequest> so that it can be, eventually, passed all the
way to the templates.

Change-Id: I550aa18e21788e24ebd103d0ce859272e40d23de
Reviewed-on: https://gerrit.stanford.edu/1612
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>