tnef: Fix major issue iterating over attr streams

The original logic would read the count of attributes in the stream and then
read the first attribute in the constructor of TnefAttributeStreamReader.
Then the iterator interface would call ::rewind() before iterating to the
first item. rewind() set the @pos attribute to zero, which would cause the
attribute count (4-byte int) to be interpreted incorrectly as part of the
first attribute.

The new logic sets the position at 4 after rewind()ing, and does not read
the first attribute twice. It also properly detects the end of the attribute
stream by the number of attributes advertised as the first four bytes of the
stream (read into the @count attribute initially).
Merge pull request #825 from greezybacon/issue/tnef-bad-rewind

tnef: Fix major issue iterating over attar streams

Reviewed-By: Peter Rotich <peter@osticket.com>
oops: Fix incorrect SQL query in staff directory
banlist: Trim new entries and updates via web form
Merge pull request #837 from greezybacon/issue/banlist-trim

ban list: Trim new entries and updates via web form

Reviewed-By: Peter Rotich <peter@osticket.com>
Ticket assignment alert can be disabled
js: Don't crash if no date set in a datepicker
forms: Display breaks in non-html textarea fields
Merge pull request #839 from greezybacon/issue/disable-assignement-alert

Ticket assignment alert can be disabled

Reviewed-By: Peter Rotich <peter@osticket.com>
security: Remove potential XSS vulnerability

The ThreadEntryWidget has a potential cross site scripting (XSS)
vulnerability if data was posted directly to the page hosting the widget

Vulnerable URLs:
view.php, open.php, scp/open.php, scp/tickets.php

The content received in the HTTP POST is now correctly escaped when it is
echoed back to the user agent.
Merge remote-tracking branch 'upstream/develop' into develop-next

Conflicts:
	open.php