What is a global temporary table in SQL, and in what scenarios would you use it over a local temporary table or a table variable?