Ensure beautified output is the same when rebeautified

#258 surfaced and interersting issue that was not caught by the
current test framework.  Now the framework checks that beautified
output is unchanged after being run through the beautifier again.

Adding this check immediately found a bug in the beautification of
function declarations. Fixed that as well.