Switching , relay and complementarity systems : a tutorial on their well-posedness and relationships