Updated the patch with the stated modifications. Please review.
Here is the output in busybox (probably the closest system to POSIX I have around here, but the earlier version also works fine):
~> busybox sh
BusyBox v1.18.4 (Ubuntu 1:1.18.4-2ubuntu2) built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ $ EXAMPLE=".::./././//./://bingo//:baz:::://///:./.:."
~ $ echo :$EXAMPLE: | busybox sed -e 's|//*|/|g' -e 's|:\(\./\)\{1,\}|:|g' -e 's
|\(/\.\)\{1,\}:|:|g' -e 's|\(:\.\)\{1,\}:|:|g' -e 's|::*|:|g' -e 's|^::*||' -e '
s|::*$||'
/bingo/:baz:/