Recognition and Modeling of Planar Mechanical Linkages from Images Using Symbolic and Behavioral Cues