iscsi: let conn_close() transfer state of a connection

Current tgtd seems to have a possibility that it has a connection
whose state isn't STATE_CLOSE even after the connection is passed to
conn_close(). Such a connection is confusing because
iscsi_scsi_cmd_done() cannot detect closing of the connection.

This patch lets conn_close() transfer state of a connection to
STATE_CLOSE for avoiding this problem.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
iscsi: offload iSCSI PDU send/recv to worker threads

Current tgtd sends and receives iSCSI PDUs in its main event
loop. This design can cause bottleneck when many iSCSI clients connect
to single tgtd process. For example, we need multiple tgtd processes
for utilizing fast network like 10 GbE because typical single
processor core isn't fast enough for processing a bunch of requests.

This patch lets tgtd offload send/recv iSCSI PDUs and check digests to
worker threads when a parameter of "-T" option is larger than 1. The
offloading is done by a newly added event handler,
iscsi_tcp_mt_event_handler(). When "-T" isn't passed or value 1 is
passed, single threaded version (iscsi_tcp_st_event_handler()) is
used. The single threaded version is provided because in some cases
the multi-threaded version degrades performance (e.g. a number of
initiators are not so large).

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
iscsi: per worker thread work queue for rx/tx PDU

In the previous commit, rx/tx and checksum calculation of PDU are
offloaded to worker threads. But the worker threads share two queues
for storing every state of progressing rx/tx. The two queues are too
coarse grained and can be a bottleneck under heavy load. This patch
breaks the queues into per worker thread unit for scalability.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>