A unified view of propagating and localized surface plasmon resonance biosensors