Unlock cft_count lock before returning in case of empty list.

'list' should never be NULL, given that the function receives the address of the
list pointer, and the only call passes in &CONNECTIONLIST.

This fixes up commit e302e38e0efdb33fcd53ec7acc41686214dbc6ea
(cherry picked from commit f561f5eceb22881ab8f86119645cc08ccaa3a0ca)
Don't protect malloc call with system mutex in main server loop.

Not required to synchronize malloc calls, it's threadsafe on all supported platforms.

This partially backports f55a6610fbfcd078c1e2a58cd0da94efef35cc2d
(cherry picked from commit 5e0e6bd6575403de7758a019866c490ab2a39e30)

Conflicts:

	src/server.c