Implement allocate_version method on ApplicationHistory
change to_json to include latest ApplicationHistory and latest ApplicationHistory Version