Cleaned Partitioner source by taking out non-related logic to Utils

1. Replaced implicit implementation of mod(x, m) (modulo operation) in default partitioner with call to freshly defined mod(x, m) if Partitioner.scala
2. Replaced asInstanceOf/isInstanceOf with pattern matching; added a call to mod(x, m) again, thus, removed duplicated code chunks.

Before accepting (and if!), please consider to tell me if it would be more appropriate to change null-checks to corresponding case-matches (```case null => ...```) to make style more consistent?