Refactoring portallocator

Faster, more documented, less code.
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Merge pull request #6799 from LK4D4/refactor_portallocator

Refactoring portallocator