One Haskell and integer sizes fix
One Haskell and integer sizes fix

Haskell has two main integer types:

- Int, which is a native-type, and is guaranteed to have at least
  [-2²⁹, 2²⁹-1] range; on 64-bit platforms, it has much higher range
- Integer, which is a software type (implemented using libgmp), and
  thus unbounded

For performance reasons, the node/instance properties use Int for
their attributes (and Double for some, but that's another story). This
is all fine and doesn't cause problems. However, the CStats type which
holds the overall cluster resources starts to fail when we analyse
clusters with more than around 400 nodes and big memory/disk sizes on
32 bit platforms.

The simple fix would be to restrict cluster sizes, but that's no
nice. I've benchmarked and changing to Integer doesn't show a visible
slowdown on 64-bit platforms (as far as I can read on the internets,
GHC knows to optimise Integer and only use software types when the
values are large enough), and it also fixes the 32-bit problem. So
this patch changes the CStats types to Integer, except for the
instance count (which I don't expect to overflow 2²⁹ anytime soon).

Signed-off-by: Iustin Pop <acf83a5274f31a43af6b914614365999469c1a31@google.com>
Reviewed-by: Guido Trotter <f62ca4d5358bdaeef0e50e57f9f7e231de63727e@google.com>

ganeti/ganeti,apyrgio/snf-ganeti,ganeti-github-testing/ganeti-test-1,apyrgio/snf-ganeti,ganeti/ganeti,mbakke/ganeti,leshchevds/ganeti,grnet/snf-ganeti,onponomarev/ganeti,mbakke/ganeti,apyrgio/ganeti,andir/ganeti,yiannist/ganeti,yiannist/ganeti,onponomarev/ganeti,dimara/ganeti,bitemyapp/ganeti,grnet/snf-ganeti,ganeti/ganeti,andir/ganeti,andir/ganeti,leshchevds/ganeti,dimara/ganeti,bitemyapp/ganeti,ganeti-github-testing/ganeti-test-1,yiannist/ganeti,apyrgio/ganeti,leshchevds/ganeti,mbakke/ganeti