Compact entry returned to user: 1) Eliminate spaces and double ':'. 2) Remove duplicated capabilities from tc= expansion. It is needed to not overflow historycal 1024 limit.
Compact entry returned to user:
1) Eliminate spaces and double ':'.
2) Remove duplicated capabilities from tc= expansion.
It is needed to not overflow historycal 1024 limit.

Add range check and return -1 if entry is too big instead
of corrupting user memory.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase