ipool: implemneted net30 allocator
move 'comp' field from struct ppp_t to struct ap_session

[BConflicts:
	accel-pppd/ctrl/openvpn/openvpn.c
merge upstream
add missing files
generalize single-session checking
use CMAKE_FIND_ROOT_PATH prefix
cli: show properly comp field
implemented different sessionid length and urandom source
pppd_compat: pass calling_station_id and called_station_id via env
session: fire EV_PRE_FINISHED
session: don't accept new sessions in shutdown mode
backport 1.7
* l2tp: Fix allocation checking when adding octets AVP
* cli, tcp: Fix non-NULL terminated string reception
* Fix va_end() missing calls
* chap-secrets: implemented encryption
* auth_pap: make messages like other auth modules
* cli: check xmit_buf is not null at enter to write function
* pppoe: implemented regular expression support
* chap-secrets: implemented encryption
* ippool: fixed initialization order
* optional shaper compiling
* ppp: dns/wins code cleanup
altered session finishing procedure
ipool: implemneted net30 allocator
Revert "altered session finishing procedure"

This reverts commit 9f4f36169f03857b6910402028717210270a0339.
session: read final interface statistics on termination
Revert "session: read final interface statistics on termination"

This reverts commit 3bff891eac97037c633be960b822c688e8629165.
session: read final interface statistics on termination
pppd_compat: fix coa handler's env size
l2tp: Ensure sessions always have a valid parent tunnel

Use a session counter for each tunnel to avoid freeing a tunnel
while still having sessions depending on it.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
l2tp: Fix race condition when removing sessions

Freeing a session requires four steps:
  1-The session asynchronously requests its parent tunnel to
    remove the session (the tunnel must start the process).
  2-The parent tunnel removes its reference to this session,
    then makes an asynchronous call to the session cleanup
    function.
  3-The session performs its cleanup, frees its memory and
    asynchronously notifies its parent tunnel.
  4-The parent tunnel decrements its sessions counter (so that
    it knows when it doesn't have any session depending on it).

If two requests, A and B, for removing the same session, arrive
almost simultaneously, then the following scenario may occur:
  1a-The session handles request A and transmits it to its
     parent tunnel.
  2a-The parent tunnel removes its reference to this session
     and requests the session to perform cleanup.
  1b-In the mean time, the session handles request B and
     transmit it to its parent tunnel.
  3a-The session continues to handle request A, cleans up the
     session and frees memory.
  2b-The parent tunnel handles request B: it removes its
     reference to the session and tells it to perform cleanup.
     But the session pointer used has just been freed at step 3a.

This patch modifies step 1, so that the session transmit the
session-id instead of a pointer to the session structure. That
way, the tunnel can check if the session has already been
deleted (or is pending deletion), without having to manipulate a
potentially invalid pointer.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>