Bitcoin's price has soared past $40,000. The rally is fueled by regulatory optimism and market dynamics