Ionic liquid crystals based on viologen dimers: tuning the mesomorphism by varying the conformational freedom of the ionic layer