Write test for image upload

Here we've extracted a test helper to hold the login_as function so we
can use it across multiple feature tests.
User may upload file

This implementation relies on local file systems, which won't work when
we push to Heroku.

A future commit will make this work when uploading to AWS.

Of important note is the use of "strong parameters" here. This is the
`safe_picture_params` method in the PicturesController. This ensures
that only fields we want users to change may be changed.
Pictures are owned by a user

As you can see, my tests didn't include anything about the user! In
fact, it looks like my login wasn't even working!

Once I added in the requirement that a picture has an owner, everything
fell apart! Oops! I'd forgotten I wanted `login_as` to take a user hash,
not a user object. This is the problem with copy-pasta! There's a pretty
fancy way to get around this in rspec; but it's more about being clever
than anything else so I won't do it. (Hint: It involves defining your
own describe-type!)

The *actually* cool bits here are:

1. Using the association to create the picture
   (`current_user.pictures.create`). This is easy to overlook; and is
   one of the things I really appreciate about ActiveRecord.
2. Getting all the semantic goodness of a Picture belonging to an Owner.
   (Even though the class is `User`). Another thing I appreciate about
   ActiveRecord. Being able to preserve the semantic meaning without
   creating weird intermediary classes. You should see this in both the
   User and Picture model
Add flash notification that their picture uploaded

Providing feedback is always a good thing
Guest users cannot upload images

Here we're leveraging devise's built in "authenticate_user!" helper to
force someone to log in before they can even send GET or POST reuests to
the new picture route.
Require a picture and caption on upload

Now we get to handling invalid uplods!

Again, you'll notice that I managed to mess up something that writing a
test caught. I had params.require(:picture).permit(:name, ...) instead
of params.require(:picture).permit(:caption, ...)

Writing these negative tests really helps.

In the controller, we now have a check that ensures the picture is
persisted before it redirects. otherwise we re-render the new picture
form.

We've also started adding some error handlers under neath of the form
field. I'll extract those soon.

e Please enter the commit message for your changes. Lines starting
Extract shared error renderer

Some people would put this in a helper. I, personally, prefer to keep as
much of my HTML as possible in partials as that means they're super easy
for a designer to work with. Yes it's a *touch* more verbose; but
keeping the html in the HTML is "worth it" in my opinion
Enable S3 Uploads

Uploading our images to S3 is the only way we can make things work on
Heroku.

This means you'll now need to have an AWS account and an S3 bucket to
upload images in development. We're using `dotenv-rails` to make loading
the ENV variables super easy.

Everything else is setting up your initializer to have the correct buckt
name and access credentials to upload your files. In the test
environment we want to just upload files locally; as uploading to S3 is
quite slow.
Merge pull request #2 from codeunion/user-may-upload-image

User may upload image