Representing and Learning Functions Invariant Under Crystallographic Groups