Log API requests to syslog.

Change log parameter to syslog on the API configuration. Import syslog
module from the Python Standard Library if the parameter is set. Log
all requests with response code to syslog.
Change the shebang to python3.