Fix many build error/warnings when CONFIG_PROC_FS is off

Following patches fix many build error/warnings when CONFIG_PROC_FS is off. With this series, Lustre can be built without CONFIG_PROC_FS.