Made the observer pattern more robust in fragments

Fragments now unregister themselves when they get destroyed, as well as doing guard checks on the getActivity() method call
Should hopefully prevent a number of the crashes
More guard statements to hopefully prevent crashing
Added a default value to getPillId for a Consumption

This might cause some erratic behaviour when grouping consumptions (although it should be fine), but at least it won't crash