ssl: Fix fd leak on write error

Reported by Coverity as CID #1167591
ssl: avoid null pointer dereference

name is checked not to be null earlier, if it is here just error
out.

Reported by Coverity as CID #1167590
spooler: fix use after free

Reported by Coverity as CID #1153073
spooler: filename cannot be null

Since it is allocated by uwsgi_malloc.
Reported by Coverity as CID #1153071
plugins/logpipe: check setsid return code

Reported by Coverity as CID #1167589
Merge pull request #518 from xrmx/coverity0802

Some coverity fixes
fixed race condition in u_pypy_thread_attach()
sethostname fix for sun
sethostname fix for sun [2]
logpipe: Don't setsid() twice.
Merge pull request #521 from methane/patch-1

logpipe: Don't setsid() twice.
fixed #524
fixed #526
another spooler-related fix (fd leak)
fixed #528
fixed #527
fix bitmap allocation
remove extra bit in bitmap_pos optimisation

looks like it was added because there was an error in counting last_byte_bit position in cache_mark_blocks()
fix comment typos
bitmap allocation fix

fix cache_mark offset bug and change cache_unmark according to previous changes)