Mark proc as unused in ret_proc

Otherwise we'll never reuse it
Call reader and writer functions via export table

This is necessary for hot upgrades of the module.
Avoid scanning the entire table of procs

For large numbers of os processes its possible that we have a slowdown
when requesting a new process. The old code matches all possible
processes out of the table to find an appropriate candidate.

We avoid the issue by using ets:select_reverse to also prefer keeping
newer processes and releasing longer lived processes. Length of life is
based on the implicit sorting of pids having newer pids sorting larger.