Consolidate consecutive identical cells into <td colspan="n"> entries