Molecular Theory of Acyl Chain Packing in Lipid and Lipid-Protein Membranes