Change to fixed width ints

As proposed in eudaq/eudaq#61 I've changed (most) occurrences of "long long" and "long" into int64_t and int32_t to ensure that the width of these variables is the same across platforms.

I would like someone to have a careful look over these changes before they are merged!