fix documentation tests and add rtd environment (preliminary)