move msg_id to Connection class; replace tap with tape for testing

Moving `msg_id` means that features don't need to set `id` field anymore; `Connection` will annotate it. This also changes the scope of `msg_id` from per process to per `Connection`.