Your comments

Yeah, that's certainly an interesting idea. That way it would also be included in the actual file (in comments) and available to other applications as well. Textastic could display a list of TODO items.

That reminds me of this idea: http://feedback.textasticapp.com/feedback/7796-show-a-list-of-functionsclass-methods/

The scratchpad, which is only available in Textastic, could be an additional/separate feature
I already store information like last cursor position and custom syntax definition setting for each file in the upcoming 1.1 update of Textastic. It should be relatively easy to add a scratchpad feature. I might add an auto-resizing textfield in the file info popover. People could use this for whatever they want to note about the file.

The only downside I see is this: it wouldn't be copied over when copying the file to another app or computer or if you send it via email.
Implementing option 1) would be a whole lot easier if the Dropbox API supported sync out of the box.

Is anyone aware of an existing sync implementation for the Dropbox iOS API with source code available?
I just had a look at Terra Web Browser. Seems like they use a mixture of 4.2 and the 4.1 SDK:

DTCompiler: "4.2"
DTPlatformVersion:"4.1 GM"
DTSDKName: "iphoneos4.1"
MinimumOSVersion: "3.2"

Well, I'll rather play it safe instead of having Apple reject the app.
Well, as long as this is in beta I can't submit iPad apps compiled with the 4.2 SDK but I have to use the 3.2 SDK.

But I tested version 1.1 with 4.2 beta 3 and it's working like a charm. Of course I'll be sure to submit an update as soon as Apple allows this.
That would be a pretty cool feature!
I think I found the problem. It should be fixed in the next update.