Pluto: fallout from code reading

tidy:
	fix grammar in comments and messages
	fix some whitespace
	testing pointers for NULL should be explicit
	reduce scope of locals
	use symbols, not magic numerals
	remove some redundant parentheses

clarify:
	rename build_ke => build_ke_and_nonce
	rename unpack_KE => unpack_KE_from_helper
	rename enum member pcr_build_kenonce => pcr_build_ke_and_nonce
	add const to some pointer parameters
	use enum type instead of int where appropriate
	improve pluto_cryptoop_strings

Correct:
	In TS handling, some functions returned -1 for exceptions
	but the callers stored the result in unsigned int variables.
	Fix:
		document function return values
		retype index variables and parameters
		handle -1 results

Simplify:
	eliminate struct msg_digest's pst (redundant and only sometimes accurate)
	refactor TS matching code, reducing redundancy
	remove redundant payload checking (already done by state machine)

archaeology:
	add pexpects for exploratory purposes
	add explanitory comments capturing discoveries
		document functions better (note -1 returns)
	add comments for mysteries (possible bugs)
Merge branch 'master' into hugh-2014aug
ikev2: improve debug message.
Merge branch 'master' into hugh-2014aug

Conflicts:
	programs/pluto/ikev2_child.c
	programs/pluto/ikev2_parent.c
ikev2: partial support CREATE_CHILD_SA as a responder
pluto: tidy some of the "alg" handling.

- properly protect parameters in macro bodies with parenthesis
- use bool return values where natural
- fix comments to be truthful
- reduce scope of auto variables
- explicitly compare pointers with NULL in bool contexts
- local simplifications
- improve a couple of messages
ikev2: remove extra comments
ikev2 : improve function names
ikev2: clarify another case pexpect in complete_v2_state_transition
Merge branch 'hugh-2014aug' of vault.libreswan.org:/srv/src/libreswan into hugh-2014aug

Conflicts:
	programs/pluto/ikev1_quick.c
testing/pluto/setup.sh: change so script will survive "set -ui"
testing/utils/re-sanitize.sh: add documentation; add "set -ui"
testing/utils/sanitize.sh: fix spelling, trailing whitespace
Pluto: tidy alg stuff

- rename kernel_alg_esp_enc_ok => check_kernel_encrypt_alg to reflect return type
- rename is_virtual_net_allowed => check_virtual_net_allowed to reflect return type
- indicate success via boolean result, not int: ike_alg_register_hash, ike_alg_register_enc
- return void where no caller uses result: ike_alg_twofish, ike_alg_serpent_init, ike_alg_aes_init, ike_alg_sha2_init
- ike_alg_sha2_init: try adding each keysize separately
- pfkey_register_response:
  + unify klips_pfkey_register_response and linux_pfkey_register_response => pfkey_register_response
  + move initialization of kernel alg lists from pfkey_register_response to stack init routine
  + handle AH in pfkey_register_response
- tidy struct ike_alg, struct encrypt_desc, struct hash_desc
- add comments noting some mysteries
- updated some comment to post-FreeS/WAN
- tidy kernel_alg_register_pfkey; relocate call to kernel_alg_init
- reorganize sadb_alg_ptr
- get rid of field aliases:
	esp_ealg_id
	esp_aalg_id
	esp_ealg_keylen
	esp_aalg_keylen
- get rid of ESPTOINFO and IKETOINFO
- don't convert types thoughtlessly (eg. signed to unsigned)
- ike_alg_show_status: for auth algs, show trunclen
  (struct hash_desc field hash_integ_len)
Merge branch 'master' into hugh-2014aug

Conflicts:
	lib/libswan/alg_info.c
	programs/pluto/plutoalg.c
	testing/pluto/TESTLIST
Merge branch 'master' into hugh-2014aug
ikev2: remove the function ikev2_create_child_sa_in_refuse
It was sending v2N_NO_ADDITIONAL_SAS
Clean up SHA2 hashing so that lying casts are not used.

The struct hash_desc initialization had casts that lied and could misbehaviour.
Also: simplify hash finalization in compute_digest.
Clean up Pluto's hashers:

- make them type-safe
  + added "thunk" routines to convert union hash_ctx *
  + use size_t for sizes in caller and callee
  + eliminate use of casts for function pointers
- rename userland osMD5* => lsMD5*.
- leave kernel osMD5* as-is (seems odd)
- use names instead of numerals
- make SHA384 first-class
- eliminate ikev2_natd_hasher
"const" generally belongs at the front of a type specifier