elpy-initialize-variables: New function.

This reworks the way elpy overwrites the variables of other modes.
The old method tried to be too smart, but relied on elpy being
loaded first to actually work. The new method might overwrite
user configurations if `elpy-enable` is run after those variables
are set, but that should be more accessible and understandable
than the old behavior.

Fixes #35
elpy-doc-history: New variable.

This is used to provide a history for the pydoc query.
forward-sexp-function: Set to nil in python-mode.

The default behavior of python-mode is very strange and inconsistent,
as it considers the last line of a method to be "the end" of the method
and moving backwards a sexp there will not move backwards over a symbol,
but backwards to the beginning of the method. The maintainer considers
this a feature and thinks setting `forward-sexp-function` to nil is
the way to fix it for users.

Elpy does this now, but it required a new function to be run in the
python hook.

See http://debbugs.gnu.org/db/13/13642.html for the report and
discussion.
elpy-initialize-variables: Bind RET as no-op in ac-completion-map

When using auto-complete as a completion library for "search as you
type" style completion, using RET usually means the user is happy
with the current completion and just wants a newline, much like
SPC means the user is happy with the current contents and wants
a space inserted. The default behavior of ac uses RET to confirm
the current completion, which can be very annoying.

This commit changes this default behavior.
Rope completion: Handle errors gracefully.

When rope can't parse a file, it'll throw errors, which can
be very annoying when working on such a file. This catches
those errors, transforms them into a message, and handles
them gracefully.
elpy-refactor: New command (by default on C-c C-r)

This brings up a refactoring interface that queries the user for
refactoring actions to use, asks for arguments, and provides a
refactoring interface that displays the change and can be committed
using C-c C-c like other similar buffers.

Fixes #28
elpy-project-root: Create directory if it does not exist.

Creating a file in a directory that didn't exist and setting
the project root there caused an error. This commit should fix
that problem.
ropebackend.rpc_get_calltip: Be a bit more smart about parens.

The prior routine to find the calling method name simply looked
for the last opening parenthesis, which gets confused if there's
another method call in the way. The new routine is slightly more
smart by ignoring matching parentheses.
refactor_rename_current_module: Argument should be a string, not file name.

Not sure why the tests before worked, that was completely wrong.
RopeBackend.rpc_get_completions: Handle import completions.

For some reason, Rope can't complete top-level modules on
"import foo". This commit adds some monkeypatching that extends
rope do just that.

Fixes #32
utils: New package; renamed old utils.py to pydocutils.py

This is in preparation to adding further utility functions.
New refactoring action: Add missing imports

This refactoring action will look for undefined variables in the
current source file and add imports to the source that make them
available.

Fixes #37
elpy-rgrep-symbol: Allow user input with prefix arg.

Searching for definitions only is a lot less useful than searching
for any symbol as per user input now that M-. finds definitions
easily.
setup.py: Add elpy.utils to the installed packages.
Merge pull request #39 from anjensan/master

Supoort Python 2.6

Python 2.6 does not support running packages as scripts directly,
and requires specifying the `__main__` module within them manually.
findundefined, autoimport: Do not add duplicate modules.

There was a bug that added a module multiple times if it was used
multiple times in the same source file. This commit should fix that.
elpy-tests.el, test.sh: New files to enable automated testing for Lisp.

Elpy now has some unit tests for the lisp code. The coverage is not nearly
as extensive as the Python tests are, but it's a start. The test.sh
script can run elpy tests in a number of different Python versions.
elpy.el: Fix some docstrings, rename some functions to internal names.
build.sh: Also install elpy-refactor.el.
elpy-enable: Error on Emacs 23.

Elpy does not work with Emacs 23, as it requires a number of features
of the newer Python modes. The errors are very confusing, though. So
we now simply error out on Emacs 23 and give a good description to
help users identify the problem.