8044638: Tidy up Nashorn codebase for code standardsReviewed-by: lagergren, sundar
8020223: ClassCastException: String can not be casted to ScriptFunctionReviewed-by: attila, lagergren