move common rabin/shamir code paths into base classes

* while in there refactore lots of stuff
* this will be slower (again), but should be the path to
  better readability. To be honest I've given up on the
  java performance as the whole "unsigned byte", "memcpy",
  "memset" things hurt the overall performace. I'll settle
  for couple-of-MB-of-raw-data/second over my C-implemenation's
  couple-of-dotzens-of-MB-of-raw-data/second for readability's
  sake.