javascript port of JWZ email conversation threading