ZeroMQ Json Output

This is a complete patch that will allow the outputing of all alerts
to a zeromq PUB socket in JSON format.

New Config:
<ossec>
  <global>
      <zeromq_output>yes|no</zeromq_output>
          <zeromq_uri>tcp://localhost:11111</zeromq_uri>

Somethings had to change to allow this to work.  Based on the
preprossor defines
- WINDOWS was redefined by OSSEC and is used by GCC changed
  the define to to DECODER_WINDOWS
- __name was redefinied by OSSEC and is used by GCC changed
  the defeine to be __ossec_name
strcmp test was incorrect and would not correctly add the data
agent_config profiles for windows
fix openssl operations on non blocking socket
Made the command line debug level take precedence over what is specified
in internal_options.conf.
Fixed agent.debug option in internal_options.conf

Doesn't look like agent.debug in the internal_options.conf ever worked.
This patch changes the behavior of the NIX agent to use whatever debeug
level is specified on the command line first. If no debug level was set
it will then look at the debug level set in the internal_options.conf.
Declare debug_level to 0 in ossec-agentd for NIX
Move debug determination logic so it happens before first debug
statement
Make syscheck.debug in internal_options.conf work

This should allow the user to specify a debug level for the syscheck
daemon on NIX machines using the syscheck.debug option in the
internal_options.conf. The debug level specified on the command line
takes precedence. Also, added starting up messages to match what some of
the daemons do.
Make analysisd.debug in internal_options.conf work

This should allow the user to specify a debug level for the analysisd
daemon using the analysisd.debug option in the internal_options.conf.
The debug level specified on the command line takes precedence.
Validate if a file is readable text when report_changes is set

Syscheckd will save (in <ossec>/queue/diff/) any file with report_changes
option, e.g. /chroot/dev/urandom, iso, mp3. This patch integrates libmagic
to validate mime type. Only mime type beginning with 'text/', e.g. text/html,
text/plain, will be copied and reported by diff.
Merge pull request #6 from bb2gh-ossec/gaelmuller_window_profiles

agent_config profiles for windows
Merge pull request #12 from bb2gh-ossec/awiddersheim_fix_ossec_logcollector_debug_internal_option_nix

Made the command line debug level take precedence over what is specified
Merge pull request #25 from northox/magic_check

Validate if a file is readable text when report_changes is set
add eventchannel support for ossec agent on windows vista or greater
Merge pull request #28 from SekoiaLab/eventapi

add eventchannel support for ossec agent on windows vista or greater
Merge pull request #4 from bb2gh-ossec/gaelmuller_authd_ssl

fix openssl operations on non blocking socket
Merge pull request #2 from jrossi/output-zeromq-json

ZeroMQ Json Output merged.
Merge pull request #18 from bb2gh-ossec/awiddersheim_analysisd_debug_internal

Make analysisd.debug in internal_options.conf work
Merge pull request #13 from bb2gh-ossec/awiddersheim_fix_ossec_agent_debug_internal_option_nix

Awiddersheim fix ossec agent debug internal option nix