Change integer types to int32_t, int64_t.

This exposed some minor bugs passing data types around, casting.

Change the order to be consistently in this order:
  string, int32, int64, float, double, boolean.

All types are referred to in error messages as the exact type name.