renamed reload-method to reload-code and extended functionality

Should now be able to reload any valid code object, including: methods, modules, commands, procs, etc
reload-code: use obj_name (rather than code_object) in output strings
Allow 'edit self' and 'reload-code self'

This didn't work due to a quirk in Pry::CodeObject.lookup() which purposely ignores 'expressions'
as they can be methods, which are dangerous to lookup. We now make an exception when the expression is 'self'

This code needs to be refactored as we have ridiculosu method names like  `def variable_or_constant_or_self?`
and we have methods like this in a couple of places. Refactor pls.
Pry::CodeObject, Pry::WrappedModule: introduce safe_to_evaluate? method

Unsure where to put safe_to_evaluate? method, so it's currently duplicated in
both the mentioned modules. If we can simply switch to a defined?(str) != "method" test
then we could put the method on Pry::Method.looks_like_a_method?(str, binding) and call it from both locations, avoiding duplication.

https://www.evernote.com/shard/s130/sh/4e839419-387e-43ab-81d5-06f87aa2cbac/2c640432e3ecccb2035c69c347f63af1
set_file_and_dir(): now takes optional _pry_ and target args
refactor cat command

Put each output formatter (input expression, exception, file) into its own class.
Code: extract `#max_lineno_width` from `#to_s`

"Code" means `Pry::Code`.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Code::LOC: tuple should be "reader"

There is no need to expose the "writer" method.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Code::LOC: add #== and use it in Code#==

And fix a typo in comments.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Create Pry::Code::EXTENSIONS

There is no need to create the hash of supported languages all the time
as the method gets called.

As always, fix some stylistics und stuff :-)

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Code#to_s: standardise method chain

Make it as in `Code#raw` (they both do similar things).

And fix typos, typos, typos.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Use `block` instead of `blk` across-the-board

Everywhere else in the code it's the very `block`.

Rename `Code#get_abs_path` to `#abs_path`.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Code#to_s: don't loop thrice

One loop is enough to complete the task.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Code: simplify `.from_file` class method

1. Use a temporary variable to hold code;
2. Instantiate `Pry::Code` only in one place;
3. Refactor reading from a file (a credit flies to John Mair).

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Merge branch 'wip.refactor.code'