get common prefix until slash in RTMP tokens

KMS-3146 #time 4h