Refactoring, improved testing for Attachment

Here are some improvements for app/models/attachment.rb
- moved unit tests to RSpec
- added more tests in spec/models/attachment_spec.rb
- split Attachment.find method into smaller methods
- removed some code duplication 
- removed some dead code

There is more room for improvement:
- use File instead of subclassing it
- centralize code for the directory layout (along the lines of #node_directory)
- fill in pending specs, e.g. for `delete`
- add specs that are directly related to how Attachments are used in Dradis (e.g. tempfile option?)
- better method comments
- check if find(:first,...) and find(:last,...) are really used (or potentially useful), if not, remove the code.
- move the class out of the models directory, maybe (it is not a subclass of ActiveRecord) 


Use the new Ruby 1.9 hash syntax.<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.