MAHOUT-1571: Functional Views are not serialized as dense/sparse correctly

This closes apache/mahout#9

Squashed commit of the following:

commit 584e2e31e2ac23f75bec0a04e8a7168b8d74577b
Author: Dmitriy Lyubimov <dlyubimov@apache.org>
Date:   Tue Jun 10 10:46:17 2014 -0700

    Adding test

commit ef271380e16192b55c31c7b219195d6982587206
Author: Dmitriy Lyubimov <dlyubimov@apache.org>
Date:   Wed Jun 4 14:43:24 2014 -0700

    initial fix (?)