Cleanup: miscellaneous cleanup of initial OpenSSL AES support

Use unsigned for lengths (which can't be negative); fix typos; remove
unnecessary casts; remove duplicated function (aes_icm_output); replace
magic numbers with manifest constants or computed sizes.