update examples/diffusion/laplace_1d.py for variable coefficient

- update docstring, ebcs, mesh_hook()
- new get_coef(), functions
add custom view for laplace_1d.py example to script/gen_gallery.py