Span Programs over Rings and How to Share a Secret from a Module