Write multiple alerts strings into the same fast.log output buffer.

By making the temporary buffer into which alert strings are generated
by fast.log larger than the largest alert, it is possible to put
multiple alert output strings, for the same packet, into the buffer
before writing the buffer to the file.

The buffer is currently twice the largest alert size and alerts are
written into the buffer as long as there is enough space to write one
maximum sized alert. In the common case, this could be many alerts.

Putting multiple alerts into the buffer reduces the number of system
calls to fwrite() and flush() and the number of times the file lock is
acquired. For the more common case of a single alert, the only cost is
keeping track of a few counters and starting with a larger temporary
(stack allocated buffer).

Moved the "action" string creation to a function to share common code.

Load alert_count once at the start of the function, just to make sure
the compiler doesn't decided to reload it later, since it won't
change.