Get the memberservices sorted according to grade and exclude those that
are not for the current subject.
First bits of more detailed warning for practice service expiry.
Separate the services into expiring and still-active ones.
Display them separate in the template.
Work on the message formatting
Format active service messages
Python 2.6 needs 3d party ordereddict.
KISS refactoring
More KISS refactoring of expiry messages.
Fix syntax error
KISS refactoring and some text formatting.
Small tweaks and fixes to practice service messages.
Messaging updates and fix to order link.
Add date formatting.
Show only non-exipiring services in second part of message.
Don't show any messages when nothing is expiring.
Plus some small bugfixes along the way.
Tweak rules; remove the empty portalMessage container that causes a
horizontal line.
Only use the plural when it is more than on day.
Little code gardening too.
Fix first bit of issue [issue13324] New practice expiry message.
Use only those memberservice that are relevant to the current subject.
Use closest expiry date not furthest.
Make the 'days' more legible, e.g. 'today' instead of '0 days'.