more TURN attribute formatting, to support ALLOCATE requests

This is the parsing and formatting required for the TURN server to respond to ALLOCATE requests.

This extracts cleanly from a much larger change with which I've been able to get Chrome to interact with the TURN server. The tricky part was the hashing required for MESSAGE-INTEGRITY attributes, without which Chrome will ignore any replies sent by the TURN server.