[mc] Only enable KSM on snapshots and not on main memory

Merging pages on the main memory will generate page faults on write
and we won't gain much memory.
[mc] Protect snapshots against write
Swig only in maintainer mode
Fix missing java include