Move 'libmadx/madx_structures' to 'cpymad/libmadx'

This is useful for the upcoming splitting of cpymad from jpymad.
Furthermore, I plan to redesign and simplify the actual cython binding
to libmadx to be contained in only one C-extension that exposes top
level functions. This is only the first step.
Merge/move 'libmadx/table' into 'cpymad/libmadx'
Move 'madx' to 'cpymad/madx'

For now a simple backward compatibility alias is left at the old
location.
Move remaining "cdef extern" imports to 'cpymad/libmadx.pxd'
Move all MAD-X bindings to 'cpymad/libmadx.pyx'

The cpymad.madx module is now essentially a python file.
Make cpymad.madx a python module (only renaming!)

Since the C-API binding is now completely contained within
cern.cpymad.libmadx, we don't need cpymad.madx to be a cython module
anymore.
Move cython relict in madx.py to libmadx.pyx
Fix weird import bug

The last commit has created a weird import error, but only on python2.x
and only when installing with `python setup.py install` (as opposed to
`pip install .`).

Currently, I don't see any reason for this issue, especially since the
last commit was only a rename - I double checked that it was working on
the previous version.

Luckily, the issue is easy to fix.

In more detail: when performing `import cern.cpymad` an exception
occured with the following traceback:

    Traceback (most recent call last):
      File "test/cpymadtest/test_survey.py", line 2, in <module>
        from cern import cpymad
      File "build/bdist.linux-x86_64/egg/cern/cpymad/__init__.py", line 20, in <module>

      File "build/bdist.linux-x86_64/egg/cern/cpymad/model.py", line 35, in <module>
      File "build/bdist.linux-x86_64/egg/cern/madx.py", line 10, in <module>
      File "build/bdist.linux-x86_64/egg/cern/cpymad/madx.py", line 31, in <module>
    AttributeError: 'module' object has no attribute 'cpymad'
Use relative import statements in cpymad

From now on use relative import statements in the cpymad subfolder where
possible. I don't know if this makes anything better, but it looks
cleaner to me and the last commit fixed some weird bug with an absolute
import statement (possibly due to a circular reference?).
Add RPyC service

RPyC is an RPC library that uses proxy objects to facilitate
communication with a remote service. We can use it for communication
with the libmadx binding.
Rename class cpymad.madx.madx to cpymad.madx.Madx

The default python naming convention is to use CamelCase for class
names. For backward compatibility the name 'cern.madx.madx' is still
available (although I think it should be removed when splitting cpymad
and jpymad as this will be a major change anyway!).
Use the RPyC service in cpymad.madx to make instances independent

This effectively let's instances of the madx wrapper class act
independently, since they are now communicating with a remote backend.

This resolves #35 and partly #43.
Use cpymad.madx directly in cpymad.model

Since each cpymad.madx.Madx instance now represents one separate
instanciation of the MAD-X library, we can forget about the
multiprocessing wrapper in cpymad.model. The functionality of this part
is replaced by the RPyC service.

Fixes #3 (hopefully).
Fixes #43 for python>=2.7
Fix install error

Again there is a confusing error under the following conditions:

- python2
- having installed via `python setup.py install`
- only when reinstalling using the same command

Apparently, it seems to be caused by having a separate top level python
module. So, I'll just move the 'rpyc_classic_stdio.py' into the cpymad
package for now.

Not sure, what the reason for this is. Seems to me like yet another bug
in setuptools. It is possible that the installation succeeds anyway
since this occurs at the very and of the setup process.

The complete traceback is:

    Installed <site-packages>/cern_pymad-0.5-py2.7-linux-x86_64.egg
    Processing dependencies for cern-pymad==0.5
    Traceback (most recent call last):
      File "setup.py", line 159, in <module>
        'rpyc>=3.2'
      File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "<site-packages>/setuptools/command/install.py", line 73, in run
        self.do_egg_install()
      File "<site-packages>/setuptools/command/install.py", line 101, in do_egg_install
        cmd.run()
      File "<site-packages>/setuptools/command/easy_install.py", line 380, in run
        self.easy_install(spec, not self.no_deps)
      File "<site-packages>/setuptools/command/easy_install.py", line 604, in easy_install
        return self.install_item(None, spec, tmpdir, deps, True)
      File "<site-packages>/setuptools/command/easy_install.py", line 655, in install_item
        self.process_distribution(spec, dist, deps)
      File "<site-packages>/setuptools/command/easy_install.py", line 706, in process_distribution
        [requirement], self.local_index, self.easy_install
      File "<site-packages>/pkg_resources.py", line 631, in resolve
        requirements.extend(dist.requires(req.extras)[::-1])
      File "<site-packages>/pkg_resources.py", line 2489, in requires
        dm = self._dep_map
      File "<site-packages>/pkg_resources.py", line 2474, in _dep_map
        for extra,reqs in split_sections(self._get_metadata(name)):
      File "<site-packages>/pkg_resources.py", line 2964, in split_sections
        for line in yield_lines(s):
      File "<site-packages>/pkg_resources.py", line 2161, in yield_lines
        for ss in strs:
      File "<site-packages>/pkg_resources.py", line 2503, in _get_metadata
        for line in self.get_metadata_lines(name):
      File "<site-packages>/pkg_resources.py", line 1429, in get_metadata_lines
        return yield_lines(self.get_metadata(name))
      File "<site-packages>/pkg_resources.py", line 1421, in get_metadata
        return self._get(self._fn(self.egg_info,name))
      File "<site-packages>/pkg_resources.py", line 1486, in _get
        return self.loader.get_data(path)
    zipimport.ZipImportError: bad local file header in <site-packages>ython2.7/site-packages/cern_pymad-0.5-py2.7-linux-x86_64.egg
Remove future feature absolute_import from libmadx.pyx

This should fix the build error on the testing servers:

    cern/cpymad/libmadx.pyx:15:23: future feature absolute_import is not defined

The issue is probably caused by an old version of cython<0.18.
Use .pxd declarations in .pyxd implicitly

According to the documenation using a cimport for the declarations in
the corresponding .pxd file for a .pyx file is not necessary, see:

http://docs.cython.org/src/reference/language_basics.html#cimport

This also seems to fix the warning:

    missing cimport in module 'cern.cpymad.libmadx': src/cern/cpymad/libmadx.pyx
Make tfs.LookupDict pickleable

The auto-generated pickling code would go into infinite recursion.
Copy values from remote process

Beforehand, the objects returned by calls to twiss() etc were only
proxies to remote objects (TfsTable with numpy.arry in them and so on).
Access will generally suffer from bad performance and some operations
on them may fail.
Fix warning: src/cern/cpymad/libmadx.pxd:64:18:

Non-trivial type declarators in shared declaration (e.g. mix of pointers
and values). Each pointer declaration should be on its own line.
Return only basic data types in libmadx.pyx

This module should be only a light wrapper around the MAD-X C-API.
Convenience functions are the responsibility of the madx.py module.