Alert file formatting clean up.

Put { on new line for function declarations. Remove space after function
name.

Add static to unit tests delcaration.
Reduce time the file lock is held to write an alert to Fast.log

Generate the alert string into a temporary buffer before aquiring the
file lock. Only hold the file lock while writing the alert string to the
file.

In the case of multiple alerts, it would be better to generate all the
alerts, then aquire the lock once and write them all and then flush.

Changed PrintRawLineHexFp, which printed to a file, to PrintBufferRawLineHex,
that puts the same output into a string buffer. It was only used by fast.log.
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.
Add option on Tile-Gx for logging for fast.log alerts over PCIe

When running on a TILEncore-Gx PCIe card, setting the filetype of fast.log
to pcie, will open a connection over PCIe to a host application caleld
tile-pcie-logd, that receives the alert strings and writes them to a file
on the host. The file name to open is also passed over the PCIe link.

This allows running Suricata on the TILEncore-Gx PCIe card, but have the
alerts logged to the host system's file system efficiently. The PCIe API that
is used is the Tilera Packet Queue (PQ) API which can access PCIe from User
Space, thus avoiding system calls.

The source and Makefile for tile-pcie-logd are added in contrib/tile-pcie-logd.

By default, the file name for fast.log specified in suricata.yaml is used as
the filename on the host. An optional argument to tile-pcie-logd, --prefix=,
can be added to prepend the supplied file path. For example, is the file
in suricata.yaml is specified as "/var/log/fast.log" and --prefix="/tmp",
then the file will be written to "/tmp/var/log/fast.log".
Added missing case code
Try to get Makefile.am working
Check for TILERA_ROOT environment variable before building tile_pcie_logd

Building tile_pcie_logd on x86 requires the Tilera MDE for its PCIe libraries
and API header files. Configure now checs for TILERA_ROOT before enabling
builing tile_pcie_logd in contrib/tile_pcie_logd