Fixed DataManagerTest & Added attachmentItem functions to QAController

- Fixed DataManagerTest by fixing a couple of bugs in the Test, and a bug in the isFavorited implementation
- Added createAttachment functions family of functions to QAController
- Added QuestionItem::hasAttachments() derived info for UI to use.  
That file needs a lot of work, I didn't actually write it. I just had to change that line due to the change in API of controller.