Fix connection type bug in block factory app.  Fix turn randomly option in maze app.

git-svn-id: http://blockly.googlecode.com/svn/trunk@583 c400ca83-b69d-9dd7-9705-49c6b8615e23
Add return value to Block.duplicate_ (issue 101).

git-svn-id: http://blockly.googlecode.com/svn/trunk@584 c400ca83-b69d-9dd7-9705-49c6b8615e23