Marathon parliamentary sitting wraps up, passing legislation experts say will help turn NSW into a renewable energy superpower