Add function checking if PyOP2 has been initialized

The PyOP2 part to addressing firedrakeproject/firedrake#40.