Merge branch 'master' into team/clc-dev/services
ELB - fix response message format, DescribeLoadBalancers
Update Query API binding for Auto Scaling - EUCA-4912 - EUCA-4913

The Query API binding for auto scaling is updated to annotate all
messages appropriately. A unit test is added for the auto scaling query
binding with coverage of all implemented operations. A
QueryBindingTestSupport class is added to simplify creation of query
binding unit tests for services.

BaseQueryBinding is updated to support bindings for Date values and to
allow use of any supported simple type in a list (Boolean, Date, Double,
Integer, Long and String)

Issues with the BaseQueryBinding are addressed, these include preserving
parameter order for lists and fixing support for alternative operation
parameters. A BaseQueryBindingTest is added to provide unit test
coverage of the fixes and new functionality.

Fixes EUCA-4912
Fixes EUCA-4913
put metric data operation message binding fixes and cloud watch binding test
Auto scaling launch and terminate activities - EUCA-4893

Auto scaling is updated with support for launch and termination of
instances. Launch support includes tagging instances with the group name
and termination of instances includes evaluation of the relevant
termination policies. Launch and terminate activities are subject to
back off on failure and a configuration property is added to disable all
scaling activities in the cloud.

The AutoScalingGroup entity is updated to track the current capacity of
each group and if scaling is currently required for the group.

Entities are added for scaling activities and instances and a new
ActivityManager is added to direct/coordinate scaling activities. The
ActivityManager uses the new BackoffRunner for handling of back off on
failures and the new EucalyptusClient for access to the Eucalyptus (EC2)
service.

TerminationPolicyType is updated with implementations for each policy. A
TerminationPolicyTypeTest unit test is added for validation.

A new InternalImpersonationHandler is added and ServiceContext updated
to support impersonation for remote and local clients respectively (this
is subject to change)

TagManager is updated to allow creation of tags with restricted names
for internal clients.

EUCA-4893
Auto scaling describe auto scaling instances - EUCA-4896

Support is added for describing auto scaling instances. There is a new
AutoScalingInstanceTransform type mapper for conversion to the response
format. The AutoScalingService is updated to implement the describe
operation and a unit test is added to cover describe functionality.

EUCA-4896
EUCA-4890 Put Metric Data crud complete.  More work may be done with tables (adding different tables based on dimension hash)
EUCA-4914, EUCA-4915
Adds LoadBalancerServoceInstance, an entity class to represent the loadbalancer VM.
Adds PostServoStates service methods which is the non-AWS extension to the loadbalancer service, which will be invoked only from LB VMs.
Modified the messages.groovy and binding.xml such that the request comes through the PostServoStates method.

Tested with the python client using boto.
added IAM support for each cloud watch action type and cloud watch url to eucarc
Auto scaling terminate auto scaling instance - EUCA-4899

Support is added for termination of an auto scaling instance and for
forcing termination of all instances when deleting an auto scaling
group.

The AutoScalingService uses the ActivityManager for calling out to EC2
and to handle checking for existing scaling activity for the group. The
BackoffRunner will allow user requested termination activities to run
even when all other scaling activities are disabled.
AutoScalingInstances is updated to allow listing and deletion of
instances for an auto scaling group. A ScalingActivityTransform type
mapper is added to create the response for the instance termination
operation.

AutoScalingService errors are updated, the correct error is now returned
when attempting to delete a resource that is in use. There is a new
error for scaling activity in progress.

LifecycleState is updated with the correct values but these are not yet
used.

EUCA-4899
Auto scaling set auto scaling instance health - EUCA-4905

Support is added for setting the health status of an auto scaling
instance. The AutoScalingService is updated to support the new operation
and AutoScalingInstance is updated with a method to check if the grace
period for health checking has expired for an instance.

EUCA-4905
EUCA-4800 added distributed table model for metrics
Junit tests for query binding for ELB
Followed Steve's junit tests for autoscaling
Auto scaling EC2 instance health monitoring - EUCA-4902

ActivityManager is updated to poll EC2 to determine and mark unhealthy
auto scaling instances. In addition to the polling activity there is an
activity to replace unhealthy instances. BackoffRunner now allows tasks
to be chained, this is used for chaining terminate and launch activities
for unhealthy instance replacement.

AutoScalingGroups is updated to suport listing of groups with instances
in need of replacement or monitoring. AutoScalingInstances is updated to
support listing of unhealthy instances by group and for marking
instances as unhealthy.

EUCA-4902
Auto scaling add instances to describe group response - EUCA-5013

The auto scaling service is updated to add instance information to the
response for DescribeAutoScalingGroups. A type mapper is added to
AutoScalingInstances to transform instance information to the response
format.

EUCA-5013
Auto Scaling support for scaling activity cooldown - EUCA-4989

The auto scaling service now checks the cooldown period when setting the
desired capacity or executing a policy when HonorCooldown is true. Auto
scaling groups now record the time the desired capacity was last
updated.

The auto scaling service is updated to fail operations as appropriate if
scaling is in progress. The ActivityManager and BackoffRunner now
support checking if a task / activity is in progress.

EUCA-4989
Auto Scaling support for multiple availability zones - EUCA-4992

Auto scaling will now take availability zones into account when
launching and terminating instances.

The ActivityManager is refactored to more clearly represent/manage
scaling processes and activities (ScalingProcessTask and
ScalingActivityTask respectively). Process tasks have been added for
launch, termination and monitoring. Launch now uses an activity per
launched instance and will distribute instances across the desired
availability zones. Terminate will terminate instances in availability
zones that are no longer configured for the group in preference to any
other instances. Terminate will also pick instances to terminate so that
the availability zones remain balanced.

CollectionUtils is updated with to support sum and count reductions.

An ActivityManagerTest is added with unit tests for launch and terminate
activities.

A FuturesTest is added with coverage of the new Futures.allAsList
method.

EUCA-4992
EC2 binding update for support of 2012-12-01 version - EUCA-4943

A binding file for EC2 is added for the 2012-12-01 version.

EUCA-4943
Cloud watch message binding and test update.

CloudWatchMessages.groovy is updated to use Integer instead of
BigInteger, and to annotate with HttpEmbedded and HttpParameterMapping
where appropriate. The cloudwatch-binding.xml is updated with matching
changes.

The CloudWatchBindingTest is moved to the src/test/java directory and
updated to extend QueryBindingTestSupport.
Cloud watch message bindings test has been updated to test all request types using the autoscaling bindings test as a guide