The Victorian government has reached an in-principal funding agreement to secure the future of the Alcoa Smelter on the state's south-west coast.