Properly attach classes to stages where the stage is set by default parameter

This fixes the regression identified by
'ticket_4655_default_stage_for_classes.rb'.  This change actually
represents fewer changes to the master branch compared to commit
aa126177baf9ddaae20c22e563a2aa813155218c.  Compared to that commit,
this puts the stage<->class edge connection back into the
`Puppet::Parser::Resource.add_edge_to_stage` function, where it is
called after the class default parameters have been processed.