Resonant state expansion applied to two-dimensional open optical systems