How does Go handle resource allocation and management, and what are the best practices for resource allocation and management in Go programs?