CLOUDSTACK-7951
Limit amount of memory used by cloudstack-agent jsvc.

Signed-off-by: Edison Su <sudison@gmail.com>
(cherry picked from commit 1d6ca5eacb1725cc8485c4564aaf7332682ab5b2)
CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc

The -Xms value specifies the minimum heap size the JVM should start with and
-Xmx is the maximum heap size it can grow. The previous fix imposed minimum
limit of 1G which is unreasonably for small deployments. The fix is to start
with 256MB and limit to 2G for cloudstack-agent process. This was tested on
DevCloud/KVM and then again on a ACS/KVM deployment on real hardware.

With these values, it's possible for the agent to work in a DevCloud/KVM
environment and if JVM needs it can increase the heap size to 2G. The fix also
ports these settings to Debian cloud-agent init.d script as well.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit bb81082e58d90da9971b7e06f4c3f8639446b2d2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 3fe1f732d73d9ce12837d48d15031bc41df46b4d)