Massive measure, passed mostly along party lines, boosts funding for defense, domestic initiatives such as disaster relief, substance abuse prevention and treatment programs