Revealed Preference Tests of Collectively Rational Consumption Behavior: Formulations and Algorithms