Fixing code to make it run on new versions

Some imports have to be modified, and we need to make sure that the Q
matrix is an array for NQ[0,1] to work in the Weave inline C code.
Fix to ensure that we always compute nice log()

It seems that on the instances we are running, the values are getting
very very very low. This can result in log() getting confused and
thinking we are asking something impossible, which makes the whole
algorithm fail miserably. Quick hacking shows that values below 1e-323
are considered as too low to be usables for log(), so we cap at this
level.
Merge pull request #1 from lissyx/fix-vbmod

Fix vbmod