Add 'unique' option to history_request messaging protocol

I added boolean 'unique' option to history_request messaging protocol, to show only unique history entries.  This option is false by default so that the default behavior is not changed.  Currently this option has effect only on 'search' request.  Magic command `%history` can take `-u` option to specify this option.