[surface model] Fix flipping of booleans
Previously, the decision whether a surface was flipped was based on the first frame. However, since after the creation the frames are reordered, the first frame could be a flipped boolean, changing the flipped status of the full surfaces. This is fixed by moving the flipped flag to the commonsurface level.
The flip_bool flag is fixed now as well, it didn't work correctly for non-booleans, which have an id of 0.