Merocyanine dyes: dimeric aggregation in solution,film structure and pH sensing