Luminescent metal complexes within polyelectrolyte layers: tuning electron and energy transfer.