Asymmetric Poincaré inequalities and solvability of capillarity problems