Change coverage_doctest.py implementation

coverage_doctest.py currently uses a parsing based approach
to get list of files in a module(folder) and then parse each
file to find occurances of methods/functions. This has an obvious
flaw that parsing is ambiguous. Hence the plan is to change the
current implementation to reading a module and getting list of
methods/classes/functions/and what not using __import__, __doc__
,inspect.
Modularize code and format output for classes

I have taken the following steps to improve readibility of code:
* Create a new function, _is_skip which can handle if an object
(class/def) should be skipped for consideration.
* Format the output for classes into Missing Docstrings and
Missing Doctests.

The current test for Doctests is as same as before, if we find a
string '>>>' inside the docstring, we say it has a doctest
otherwise not.
Include functions in coverage; modularize printing

Functions have been included in the reporting framework,
though I still have to ensure that functions are skipped properly.
I found the earlier implementation of skip excessive, where ONLY
startswith('_') should suffice.

Printing report has been made another function. In further steps
I will be trying to combine function and class coverage/reporting
because in essence both work simply over __doc__ strings, and their
pruning mechanism looks same.
Use dir() builtin to find members in module; recurse on classes

Using dir() builtin to find out all members of a module. Also,
instead of listing functions and classes separately -- we use
a single loop to check each memeber for which category it belongs
to. Additionally, if it is a class we recurse to find all methods
inside it.

Also, the printing of output has been made prettier to reflect which
class a method belongs to, functions are bare as expected.
Add scoring to modules

Current scheme of scoring includes all members of a module
(function/class/methods) as entities and the amount of coverage
is defined as total documented entities by total entities.
Create helper function to print out headers

Current underlining was erratic. Changed the underline
to the size of text it was underlining. Also created a helper
function to make code cleaner.
Let os.path handle path -> module name conversion

Replacing path separators by dot for coversion to module names
is scary by using regex based search. os.path.split gives a
handy way to recursively stitch parts together. This handles
edge cases such as trailing slashes etc.
Add verbose mode

Verbose mode is enabled, and the default output is non-verbose.
Show original exception if module fails to load
Add indirect doctests

* Indirect doctest support added
* Printing (verbose) includes doctest now
* Fixed minor issues with has_doctest list, though it is not being
used currently
Fix documentation comments
Remove bare except and introduce skip members

Include a list of skip members to skip functions known to
create problems (generally builtins). Also this removes
a bare except, which can catch random events.
Add parameter list to verbose output
Improve indentation while printing function/class names in verbose mode
Handle the cases where class might have subclass

It happens sometimes (once while I was testing) that a class contained
another object that inspect recgnized as a class. We need to handle such
cases. In this scenario, we ignore because we are concerned only with top
level classes and functions/methods
Function parameters might not always be (small) simple strings

Sometimes function parameters might not be simple strings.
In that case, convert the parameters readable using str().

Also, in addition -- sometimes the parameters are too large
for any use. For example a class being passed, or a large
list which inspect converts to a large sting. Hence,
truncate above a threshold.
Overhaul function and class processing into functions

The model for giving doctest coverage follows the steps:

1. Get the list of members in a module
2. If the member is a function - process
3. If it's a class
  -> Process class
  -> Process function members of the class

Currently this was being done completely inside the code of
coverage definition. I have split the task into, process_function
and process_class. Thus the code looks much easier and modular
to read and understand.
Add usage to option parser
Change usage string
Doctest coverage can be run from anywhere

In order to run, the user simply needs to provide correct
paths to the module and the executable. Also it is assumed
that module and script lie in the same hierarchy. We construct
the module name by using os.path.relpath. Also, in the final
reporting -- name.of.module instead of path/to/file is used.