The Green Investment Bank (GIB) has been controversially sold to a consortium led by Australian bank Macquarie for £2.3 billion ($2.9 billion).