Move canonical flag from Card to SolutionString
Fix bug in canonical_solution

ActiveModel serializer was calling canonical_solution twice,
resulting in a doubly truncated regex. Switch to a non-mutating
idiom.