Use a map instead of pdict to keep pid active/removed state
The performance seems to be equal as far as Cowboy is concerned, with a possible tiny improvement in the favor of maps. The code is smaller and the runtime introspection far cleaner because the process dictionary is small again.
/cc @juhlig review and @petrohi if you want to do some benchmarking.
Looks good, indeed much cleaner. About the performance impact, not sure, if there is anything noticeable it will probably be visible under high load with very many connections, as the map will be bigger then and needs to be copied. Dunno really. Maybe @petrohi can shed some light on this.
Comparing performance of pdicts and maps seems to heavily favor pdicts (though the compiler might just optimize things out). So let's not merge this unless we can clearly demonstrate that the performance doesn't degrade.