Since head pain is a common side effect of taking Cialis, this is likely what you experienced. At the most taking an expired ED medication means that, well, nothing happens. There are no dangerous side effects of these expired medications to your liver or kidneys.
Unless you two are extremely young, if you haven't had sex in two years, it is likely that this is not going to happen anytime soon....if ever.
Just because you caught him masturbating with another male is certainly not a signal that he is gay. But it is unusual that sexual contact between the two of you has not taken place in the two years you have been dating.