Margaret Beazley to be NSW's next governor