Implement smf2_session and finish RPC code. (#1)

This patch should be ready for testing with SMF.

(cburschka/cadence/#31)