add programmer's guide to documentation

Port the RAT programmer's guide to RAT-PAC, with much editing/updating. It's far from complete, but it's a start.