Text this: Quantitative information flow under generic leakage functions and adaptive adversaries